Bash – How to echo an exclamation mark in your bash scripts

By | April 15, 2015

Im a guy who likes SOLUTIONS to issues, not neccesarily wanting or needing to know the reasons why something happens…. so heres another one…

Bash – How to echo an exclamation mark

So you would think something simple like this :

echo “abcde!abcde”


echo “abcde!abcde”
-bash: !abcde”: event not found

Damn… ok the solution !!!

set +H
echo “abcde!abcde”

Job done. Hope that saved you some time!

Check out -  Download Youtube video - CentOS (Linux), Windows, Mac

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.