4 ms·
Bash kinda broke seq for me since you can just write {99..0}
by foobarian 3y ago
Bash kinda broke seq for me since you can just write {99..0}
- o11c 3y agoOr if you need dynamic arguments, you probably want: N=9; for ((i=0; i<=N; ++i)); do echo "$i"; done
- andrewshadura 3y agoWhy use this form of for when you can just use seq and it works in any shell including fish?
- o11c 3y agoBecause capturing the output of `seq` requires spawning a whole separate process (significant for small sequences) and shoving all the data into a single buffer (significant for large sequences) rather than working incrementally.