4 ms·
TBF, half of the supposed footguns are people not understanding the difference between a command shell and a scripting language and trying to write code as if t
by a1369209993 6y ago
TBF, half of the supposed footguns are people not understanding the difference between a command shell and a scripting language and trying to write code as if they were using the latter[1], and the other half are defects of specific shell languages rather than shell programming in general[0], but the lack of a decent implementation kind of hamstrings the latter defence.
0: There is no reason why a shell couldn't fix bugs like:
$ echo "$X"
*
$ echo $X
foo.txt bar.mp4
it's just that none of the common ones do.
1: especially the incessant stupidity about adding type information to pipes, as if grep were a function rather than the arbitrary binary file /bin/grep
- fanf2 6y agoThe Plan 9 `rc` shell is a bit neater than typical Unix shells