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.
Related
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
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
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).
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!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
When I was using a Linux laptop as my dev machine, I used to do "gedit xxxx" in a Terminal. Now I just switched to MacBook, I d like to do the same thing.
I know that I can open gedit in a command line like "open gedit", but can I add the file name? Otherwise I have to use vim. I am not a fan of vim.
Add
alias gedit="open -a gedit"
to ~/.bash_profile :
Now you'll be able to gedit directly from the command line.
try:
open -a /path/to/gedit /path/to/file.txt
I added the following to my PATH:
:~/Applications/gedit.app/Contents/MacOS/
and afterwards I was able to access gedit from
the command line. One caveat: if gedit is not already running on the system, then it throws an error if I launch it from the command line. Once gedit is already running though, this works to open files in gedit from the command line.
To edit the path, open ~/.profile in an editor
I use textmate for dev, here is a tutorial how it is done for Textmate
http://manual.macromates.com/en/using_textmate_from_terminal.html
I believe the same would apply to gedit.
Hope it helps