4 ms·
bash: !\n: event not found bash: syntax error near unexpected token `fi' bash: syntax error near unexpected token `}' bash: update_status_line: command not foun
by riddley 3y ago
bash: !\n: event not found
bash: syntax error near unexpected token `fi'
bash: syntax error near unexpected token `}'
bash: update_status_line: command not found
$ printf "!%s!\n" $exit^C
bash: update_status_line: command not found
$ echo $BASH_VERSION
5.2.15(1)-release
- kazinator 3y agoWhen ! occurs in an interactive command, Bash treats that specially (for history substitution or something; I don't use this so I'm foggy on the details). It's a POSIX violation which the Bash people think is okay because it doesn't affect scripts. So you can't just dump this into your shell interactively. It's meant to be put into a file that is sourced. Sorry about not mentioning it!