Page 1 of 1

Bash, echo and an exclamation mark

Posted: Mon Aug 12, 2013 11:43 pm
by ^rooker
Learning something new every day!
Today I ran into the problem echoing a string in bash that contains an exclamation mark.
I'm pretty surprised, because I doubt that I never output a string like that before... Puzzling.

However.
Try the following in bash:

Code: Select all

echo "ouch!"
It returns:
-bash: !": event not found
WTF? :shock:

Read this:
http://qntm.org/bash