From 06aab0caab825f7d3784617c41a0c6371f3478e7 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 22 Dec 2021 18:27:12 +1100 Subject: [PATCH] Fix caps and highlight examples --- SC1010.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SC1010.md b/SC1010.md index 3c6f7ba..d022d1e 100644 --- a/SC1010.md +++ b/SC1010.md @@ -4,24 +4,24 @@ ### Problematic code: -``` +```sh for f in *; do echo "$f" done ``` or -``` +```sh echo $f is done ``` ### Correct code: -``` +```sh for f in *; do echo "$f"; done ``` or -``` +```sh echo "$f is done" ``` @@ -34,4 +34,4 @@ In the example, `echo "$f" done` is the same as `echo "$f" "done"`, and the `don ### Exceptions -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. +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.