[root@centos ~]# printf "#!/bin/sh\nsomething"
-bash: !/bin/sh\nsomething": event not found
It fails to execute the command as a command, because it does not get saved into the command history.
Must I obfuscate the hashbang slightly in order for it to let me get past?
I tried this:
[root@centos ~]# printf "%s!/bin/sh\nsomething" #
-bash: !/bin/sh\nsomething": event not found
(Also tried echo
to the same effect)