pr_deltoid |
06-26-2010 05:57 AM |
Another thread about escaping an exclamation point in bash.
I saw another thread here about this, and did some reading and googling and came to this conclusion:
You need to use single quotations. Am I missing something here? You can't use an apostrophe and an exclamation point together in an interactive shell?
Quote:
prdeltoid@home:~$ echo "I'd say: \"Go for it!\""
bash: !\"": event not found
prdeltoid@home:~$ echo 'I'd say: "Go for it!"'
bash: !"': event not found
prdeltoid@home:~$ echo "I'd say: \"Go for it\!\""
I'd say: "Go for it\!"
|
And so on. Very strange... I'm not complaining about this, but it's very strange that you can't have a combination of an apostrophe and an exclamation point no matter what you try. But at least in scripts, this isn't true... I guess it's not a big deal at all...
|