diff --git a/2019/burton/check.sh b/2019/burton/check.sh index 5be27498e..732ac6372 100755 --- a/2019/burton/check.sh +++ b/2019/burton/check.sh @@ -16,8 +16,11 @@ echo | $x /bin/echo -n a | $x echo a | $x $x < newlines -# ^---^ SC2210 (warning): This is a file redirection. Was it supposed to be a comparison or fd operation? -# Answer: 256 is a file so it is supposed to be file redirection. +# 256 is a file so it is supposed to be file redirection. Thus we have to +# disable this warning: +# +# SC2210 (warning): This is a file redirection. Was it supposed to be a comparison or fd operation? +# https://www.shellcheck.net/wiki/SC2210 # shellcheck disable=SC2210 $x < 256 $x < remarks diff --git a/2019/burton/cow.sh b/2019/burton/cow.sh index 0c6ef792d..31a4f3013 100755 --- a/2019/burton/cow.sh +++ b/2019/burton/cow.sh @@ -14,8 +14,8 @@ do if test -r "$name"; then # (or, to use Bart Simpson's advice, make it 'not have a cow.sh'), as we # actually need this to happen: # - # ^-- SC2086 (info): Double quote to prevent globbing and word splitting. - # + # SC2086 (info): Double quote to prevent globbing and word splitting. + # https://www.shellcheck.net/wiki/SC2086 # shellcheck disable=SC2086 set -- $s ((a += $1)) diff --git a/2019/burton/try.sh b/2019/burton/try.sh index 51e164fee..a0e9e1267 100755 --- a/2019/burton/try.sh +++ b/2019/burton/try.sh @@ -15,15 +15,19 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -echo "$ cat prog.c" 1>&2 +read -r -n 1 -p "Press any key to show prog.c: " +echo 1>&2 cat prog.c echo 1>&2 for i in prog.c Makefile README.md; do - echo "$ ./prog < $i && wc < $i" 1>&2 + read -r -n 1 -p "Press any key to run: ./prog < $i && wc < $i: " + echo 1>&2 printf "prog: %s\n%4s: %s\n\n" "$(./prog < "$i"|tr -s ' ')" "wc" "$(wc "$i" | tr -s ' ')" done echo 1>&2 -echo "$ make test" 1>&2 +read -r -n 1 -p "Press any key to run: make test: " +echo 1>&2 make test +echo 1>&2