4 ms·
Looks like this is an artifact of the built-in (old) bash on osx. I see that it works in the newer versions of bash on my freebsd and linux hosts. The mac bash
by egwynn 8y ago
Looks like this is an artifact of the built-in (old) bash on osx. I see that it works in the newer versions of bash on my freebsd and linux hosts. The mac bash man page says:
Only backslash (\) and single quotes can quote the history expansion character.
where the newer man page says:
Only backslash (\) and single quotes can quote the history expansion character,
but the history expansion character is also treated as quoted if it
immediately precedes the closing double quote in a double-quoted string.
Thanks for pointing this out!
- ben509 8y agoSure, thanks for checking the man page! I usually just rip out bangs because I can never remember the rules for history expansion.