All Questions
Tagged with quoting special-characters
7
questions
18
votes
2
answers
106k
views
How to use a special character as a normal one in Unix shells?
Many questions like 'How to type the double-quote char (")?' are being asked, and we don't want to clutter our community with the same answer (Type it as \" if not enclosed in 's, " if enclosed in 's.)...
10
votes
2
answers
5k
views
Difference between ' and " on command line (bash)? [duplicate]
I used to use '' and "" (single and double-quotes) interchangeably on the command line, but I recently noticed that '$HOME/some/dir' is not expanded, while "$HOME/some/dir" is. I searched around a ...
188
votes
7
answers
179k
views
Can't use exclamation mark (!) in bash?
I'm trying to use the curl command to access a http url with a exclamation mark (!) in its path. e.g:
curl -v "http://example.org/!287s87asdjh2/somepath/someresource"
the console replies with bash: ....
8
votes
1
answer
5k
views
What are curly quotes and can I use them in my code?
Somehow curly quotes got into my code and I'm getting unexpected behavior
#!/bin/sh
if [ foo = ‘foo’ ]; then
echo yes
else
echo no
fi
I would expect this to echo yes but instead it echoes no.
7
votes
1
answer
3k
views
Representing/quoting NUL on the command line
Can \0 be used on the command line?
Background
For testing corner cases in GNU Parallel I was curious whether all characters were correctly quoted on the command line. Most of them are:
perl -e '...
4
votes
2
answers
4k
views
Makefile shell ignoring sed regexp end of line
I have a folder for various testing of C code, containing many files named *.c. My aim is to have a Makefile search for any filename ending in .c and add the root of that filename to the targets.
...
1
vote
2
answers
2k
views
Shell eating `?` characters
This is such a simple question that I'm sure it's been asked somewhere, but I can't find it. My shell, which I have not intentionally set up to do so, seems to eat any words involving question marks:
...