3 ms·
Here I thought "for" was a loop. Thanks for the explanation what the "sub" did (and more).
by e40 3y ago
Here I thought "for" was a loop.
Thanks for the explanation what the "sub" did (and more).
- yjftsjthsd-h 3y agoSo the thing to remember is that in POSIX shell (and BASH, etc.) all for loops are for-each loops. If you wanted to loop over integers, you might write `for i in $(seq 10); do echo $i; done`, but that just turns into `for i in 1 2 3 4 5 6 7 8 9 10; do echo $i; done` when it runs. So this one just iterates over "s", "u", and "b" instead.
- e40 3y agoBruh. The mansplaining over the word "loop" is insane.