-
Notifications
You must be signed in to change notification settings - Fork 1.9k
SC1010
koalaman edited this page Jun 29, 2015
·
13 revisions
for f in *; do echo "$f" done
for f in *; do echo "$f"; done
done only works as a keyword when it's the first token of the command. If added after a command, it will just be the literal word "done".
If you're intentionally using done as a literal, you can quote it to make this clear to shellcheck (and also human readers), e.g. instead of echo Task is done, use echo "Task is done". This makes no difference to the shell, but it will silence this warning.