3 ms·
Surely the version you would actually use is: seq 5
by twic 4y ago
Surely the version you would actually use is:
seq 5
- omegalulw 4y agoPresumably the point is to do something with i rather than just printing.
- lambdaba 4y agoseq 5 | xargs -n1 <...>
- dTal 4y agoVery beautiful. Of course now you have to deal with xargs' wacky syntax and options for string interpolation, which is probably why people don't do this. Compare: for i in {1..5}; do echo file_$i; done with seq 5 | xargs -I % echo file_% I had to look up the manpage for xarg's -I, while the for loop uses a small number of orthogonal features entirely in my "working set". This is also why people "uselessly" use cat.