We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bash, even in posix emulation mode, will expand braced sequences (I don't think that's the official name for this construction).
$ bash --posix -c 'echo {1..10}' 1 2 3 4 5 6 7 8 9 10
But a more minimal shell like dash will not perform this expansion
$ dash -c 'echo {1..10}' {1..10}
seq is pretty common on Linux, but is not itself POSIX. It isn't available on FreeBSD, for instance.
seq
for i in `seq 1 10`; do echo "$i" done
The POSIXest way I can think of to do this is to use a while loop and an explicit test.
i=1 while [ "$i" -le 10 ]; do echo "$i" i="$((i+1))" done
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bash, even in posix emulation mode, will expand braced sequences (I don't think that's the official name for this construction).
But a more minimal shell like dash will not perform this expansion
seq
is pretty common on Linux, but is not itself POSIX. It isn't available on FreeBSD, for instance.The POSIXest way I can think of to do this is to use a while loop and an explicit test.
The text was updated successfully, but these errors were encountered: