Bash, echo and an exclamation mark
Posted: Mon Aug 12, 2013 11:43 pm
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:
It returns:
Read this:
http://qntm.org/bash
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!"
WTF?-bash: !": event not found
Read this:
http://qntm.org/bash