macports? where did it go? [closed] - macos

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Through the process of installing Homebrew I moved a file. The command I ran was:
sudo mv /opt/local~/macports
My guess (because my command line/linux commands are limited) is that /opt/local has moved to /macports?
So should I just run the command reversed?

If it was sudo mv /opt/local ~/macports (with a space), then the reverse is
sudo mv ~/macports/local /opt

Related

Shell script for installation [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need a shell script file for Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support (LEMP) On Ubuntu 12.10. Can anyone direct me to create a shell script file to install these tools. Am new in creating shell script.
Your response should be appreciable!!!
Shell script is, basically, a file with commands you'd execute anyway by hand in command line.
Start with creating it, with the following contents:
#!/bin/bash
apt-get install ...
# do some other operations
Save it as script.sh. Now just change it's permissions, so it's executable:
$ chmod +x script.sh
Now it's ready to be invoked:
$ ./script.sh

How would you get a webpage source from Terminal? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
The community reviewed whether to reopen this question last month and left it closed:
Original close reason(s) were not resolved
Improve this question
On my website I have a text file with data on it (The site in question is hosted by GoDaddy, so I can't access the file locally). This file is updated through PHP. From the Unix/Linux/Mac bash I would like to get the contents of the text file so I can use it in scripts. Any help would be appreciated :)
curl is installed already on your Mac, so you don't need to install it. You will also find curl installed on pretty much any Linux distribution. That's probably your safest bet.
cd ~/Desktop
curl www.google.com >> google.txt
wget can be installed on your Mac easily with Homebrew. It will likely be installed already on most Linux distributions.
cd ~/Desktop
wget www.google.com
Install MacPorts and install wget:
$ sudo port install wget
And then:
$ wget http://godaddy.com/somewhere/somefile.txt
And the resulting text file will be somefile.txt (this can be changed using the -O option).

Using the unzip command in SSH with Mac Terminal not working [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I logging into my server from the Mac Terminal Bash Shell and the unzip command is not working I keep getting the following message:
bash: unzip: command not found
Can I unzip a file via SSH from Mac Terminal?
The program unzip should be in /usr/bin:
$ type unzip
unzip is /usr/bin/unzip
Worst case, you can always just "ask for it by name":
$ /usr/bin/unzip foo.zip
You should check your PATH variable, as it should normally include /usr/bin:
$ echo $PATH
$ PATH=/bin:/usr/bin:$PATH
$ export PATH
Make sure you have selected a login shell for your Terminal. This will set a good value for the PATH variable when the shell starts.

Troubles with shell script versus terminal on Pi [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to share a folder on a windows computer with the raspberry pi.
when I use these commands in terminal:
sudo mkdir -p /mnt/foldername
sudo mount -t cifs //IPADDRESS/folderIwanttoaccess/ -o username=usrname,password=passwrd /mnt/foldername
This works fine and I am able to save files on the raspberry pi to the windows shared folder.
but when I try this in a shell script I am able to see the folder as shared but with "^m" at the end.
for example: Foldername^M
Why does this happen and is there a way around to stop the "^m"?
Thanks in advance
According to this, you can sort your problem using sed, merely by using the following incantation: s/^M$//. Hope that helped!

Whitespace added after path following a command with sudo [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
When I try to execute a command as super user that is followed by a path, the auto-complete (tab) will produce a whitespace after the folder:
Example, in my home folder:
"sudo cat Doc" <tab>
produces
"sudo cat Documents "
as opposed to
"sudo cat Documents/"
This is quite annoying. Any ideas what may be wrong? Did I break it or is this simply a bug?
I am running Linux Mint 13 Mate 64.
You can use bash-completion for the issue. For Debian/Ubuntu
sudo apt-get install bash-completion
This topic seems to fix it.
I am still unsure why this occurred though. I am quite certain it wasn't an issue until today.

Resources