How do I delete this '# ... #' Emacs File? [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 9 years ago.
Improve this question
There is a file in my home directory that is called #snake#. I want to remove it but none of the regular remove commands will work. How can this "file" be removed without causing any damage, and what type of file is it?

It's an autosave file, it's there in case your computer crashes. You can delete these from emacs quite conveniently. Open up dired (C-x d) and press # to select all of them in the directory. Then x for delete.
Alternatively in a shell, just put the name in quotes, e.g. rm "#snake#"

The "problem" is that the # sign is interpreted as the start of a comment in a shell. Try enclose the file name in quotes, like:
rm "#snake#"

Related

Can't run shell scripts [closed]

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 8 years ago.
Improve this question
I'm trying to run a script in my Terminal on OSX. I run it like this:
$ script.sh input.txt output.txt
-bash: Script.bash: command not found
This script has worked before (with no changes to it) and it appears in the working directory when using the ls command. I don't know if this means anything but previously my script files had a .s logo on their filetype picture and now it is blank, like a .txt file (in Finder). Any help would be much appreciated! I tried using script.bash and the same thing happens. Thanks!
try "./COMMAND HERE"
or ". COMMAND HERE"
you need to have an explicit path if the script isn't in your $PATH
./script.sh input.txt output.txt
also you will want to make sure that the script is set as being executable
like:
chmod 777 script.sh

Rename detailed information before $ in 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 9 years ago.
Improve this question
I am using Terminal(Mac) for git.
When I use it shows mySystemName-MacBook-Pro:CurrentWorkingDir mySystemName before $ sign.
In my case the whole content is too long and hardly remains few space to write commands.
I want to rename it and use a alias so that there may be more space for the git commands.
In Short I want From this:
mySystemName-MacBook-Pro:CurrentWorkingDir mySystemName $
to this:
aliasName $
PS1="aliasName \$ "
man bash
...
PS1 The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string. The default value is ‘‘\s-\v\$’’.
...
PROMPTING
\w the current working directory, with $HOME abbreviated with a tilde
\\ a backslash
...
...
...

os x terminal command [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
Does anyone know how can i remove '#2x~ipad' string from all files name in a directory
do that a file named: image#2x~ipad.png will be renamed to: image.png
I need to rename all files in a certain directory
Can I do it with a loop from terminal? any idea?
Using bash (in the terminal):
for file in *2x~ipad.png; do
mv $file ${file%%\#2x~ipad.png}.png
done

Is this a bug in the Bash shell [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
Have I found a bug in bash?
I have created a folder named Test
cd Test/
rm -rf ../Test (Deleted the PWD while I was in that directory, as shown in image)
Not a bug, not related to bash either. You're current working directory (and all the environment variables that hold the path info in your shell) is simply pointing to a filesystem node that's been orphaned. Listing it will give you what's in the node, which is nothing because . and .. are gone (because it's orphaned). Note that rm removes everything in the directory before orphaning the node. Thus, ls gives you nothing.
Also note that when you try to create a file while inside the deleted directory with something like touch blah or mkdir blah, it'll give you a file not found error.
"orphaned" may not be the correct term, I'm simply using it to mean that it has no parent node.

How to execute shell script in cygwin? [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 11 years ago.
Improve this question
the name.sh already save in C:\Documents and Settings\user, i type sh name.sh
sh: testing.sh: No such file or directory
any help will be appreciated!
You can just type ./name.sh and your script should run.
If your current directory is not in your $PATH, adding the ./ tells the shell to look there.
The other possibility is that you're not currently in the right directory. If the result of pwd shows you are not in C:\Documents and Settings\user, then you will need to cd to that directory, or move the script to whatever directory you are in.
Add ./ in front of the name. ./name.sh

Resources