Jan Schampera wrote:
On 22.07.2011 18:12, the mad doctor kaeding wrote:
is this a bug?
echo goodbye\ cruel\ world\!
goodbye cruel world!
echo "goodbye cruel world!"
bash: !": event not found
echo "goodbye cruel world\!"
goodbye cruel world\!
No, this is a specific history expansion in interactive shells.
Execute ''set +H'' and try again (it's disabled in non-interactive
shells).
Or use single quotes:
echo 'goodbye cruel world!'
double quotes only prevent filename expansion, but allow interpretation of
other Shell meta-characters
Bye, Jojo