4 ms·
The author did say convenient, not fast. If you don't want the inefficiencies of seq, bash has: for (( expr1 ; expr2 ; expr3 )) ; do list ; done which is a
by deathanatos 7y ago
The author did say convenient, not fast.
If you don't want the inefficiencies of seq, bash has:
for (( expr1 ; expr2 ; expr3 )) ; do list ; done
which is a lot more idiomatic than constructing a for loop out of a while loop.
- pimlottc 7y agoYou could also just use a bash brace expansion: for i in {1..20} do ... done https://wiki.bash-hackers.org/syntax/expansion/brace https://wiki.bash-hackers.org/syntax/expansion/brace
- deleted 7y ago[deleted]