3 ms·
Interestingly, this comment states that Bash is not available in all POSIX. Here is where I get lost. http://blog.fourthbit.com/2014/03/01/the-best-programmin
by xcreature 13y ago
Interestingly, this comment states that Bash is not available in all POSIX. Here is where I get lost.
http://blog.fourthbit.com/2014/03/01/the-best-programming-language-or-how-to-stop-worrying-and-love-the-code/#comment-1268486352 http://blog.fourthbit.com/2014/03/01/the-best-programming-la...
- onli 13y agoYes, that is correct. Bash has additional functionality (and the for-loop I showed could very well be a part of that). If you want posix, better stick to dash, the code he showed. But bash with its additional features (like associative arrays) is much more comfortable, so if you know you can use bash - because the target is GNU/Linux - it is a good idea to use them.
- dllthomas 13y agoSh has for; it does not have the {a..b} construct. But you can write it as: for i in `seq 0 5`; do echo "$i" done and that will work perfectly well on dash.