recentpopularlog in

Copy this bookmark:





to read

bookmark detail

bash - echo "#!" fails -- "event not found" - Stack Overflow | https://stackoverflow.com/
The ! character is used for csh-style history expansion.

If you do not use this feature, set +o histexpand (aka set +H) turns off this behavior. It is turned off for scripts, but often enabled for interactive use.

As a workaround, you can use single quotes instead of double quotes.

Except when the single-quoted string is downstream of a double-quoted one in a pipeline as noted in https://stackoverflow.com/a/37917491/785213.
bash  historyexpansion  shellscripting  errormessage  weirdness  annoyance  solution 
november 2017 by kme
view in context