Select Page

Yes if you invoke Bash como “sh”, will behave as much as possible like the original sh, disabling, among other things, the expansion of keys (braces). That's why for saving me two keystrokes in the shebang (#!/bin/sh), I ended up giving many more until I found out why something as simple as this didn't work.:

#!/bin/sh
tail -fn5 /var/log/{messages,dmesg,daemon.log,syslog,debug,user.log,Xorg.0.log}

…while filename expansion normally did. So it's better to call Bash by his name. And GNU/Mozilla/KDE/OO.org Linux too… sometimes.