I am messing with echo and having issues with echo displaying the ! character.I tried this.echo -e Wake!\nUp!bash: !\n!: event not foundThen this# echo Wake\!\nUp!Wake\!Up!Well now the backslash AND the exclamation mark shows. How can I use this character properly? What am I missing?
using ! character in echo
bash;echo;special characters
Use single quotes:$ echo -e 'Wake!\nUp!'Wake!Up!If you use single quotes ('') shell will treat the string literally, whereas if you use double quotes () it will treat ! as a reference to the previous command (event). 