3 ms·
Yes, 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,
by onli 13y ago
Yes, 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.