-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2175
koalaman edited this page Jan 26, 2016
·
1 revision
eval echo {1..$n}
eval "echo {1..$n}"
Using eval somecommand {1..$n}
depends both on bash silently failing to interpret the brace expansion, and on it passing failing brace expansions literally.
Rather than depending on these questionable features (which already behave differently in other shells), use the explicit, predictable way of passing values literally: quoting.
None.