Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
o11c
8 months ago
|
parent
|
context
|
favorite
| on:
Hidden gems of moreutils
Or if you need dynamic arguments, you probably want:
N=9; for ((i=0; i<=N; ++i)); do echo "$i"; done
andrewshadura
8 months ago
[–]
Why use this form of for when you can just use seq and it works in any shell including fish?
o11c
8 months ago
|
parent
[–]
Because 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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: