-
Notifications
You must be signed in to change notification settings - Fork 1.9k
SC2041
koalaman edited this page Apr 23, 2015
·
4 revisions
for i in 'seq 1 10'
do
echo "$i"
done
for i in $(seq 1 10)
do
echo "$i"
done
The intent was to run the code in the single quotes. This would have worked with slanted backticks, `..`, but here the very similar looking single quotes '..' were used, resulting in a string literal instead of command output.
This is one of the many problems with backticks, so it's better to use $(..) to expand commands.
None.