diff --git a/1995/garry/try.alt.sh b/1995/garry/try.alt.sh index 29d812912..3fa9e91b9 100755 --- a/1995/garry/try.alt.sh +++ b/1995/garry/try.alt.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash # # try.alt.sh - demonstrate IOCCC winner 1995/garry alt code # @@ -15,6 +15,13 @@ make CC="$CC" alt >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear +# This warning from ShellCheck is incorrect: +# +# SC2028 (info): echo may not expand escape sequences. Use printf. +# +# because we don't want them to be expanded. This does show correct output. +# +# shellcheck disable=SC2028 echo "$ EXAMPLEON=\"\33\133\61\73\67\155\"; EXAMPLEOFF=\"\33\133\155\"; DOLLAR=\"$\"" 1>&2 EXAMPLEON="\33\133\61\73\67\155" EXAMPLEOFF="\33\133\155" diff --git a/1995/garry/try.sh b/1995/garry/try.sh index 1d3175889..e5548f933 100755 --- a/1995/garry/try.sh +++ b/1995/garry/try.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash # # try.sh - demonstrate IOCCC winner 1995/garry # @@ -15,8 +15,14 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear - -echo "$ EXAMPLEON=\"\33\133\61\73\67\155\"; EXAMPLEOFF=\"\33\133\155\"; DOLLAR=\"$\"" 1>&2 +# This warning from ShellCheck is incorrect: +# +# SC2028 (info): echo may not expand escape sequences. Use printf. +# +# because we don't want them to be expanded. This does show correct output. +# +# shellcheck disable=SC2028 +echo "$ EXAMPLEON=\"\\33\133\61\73\67\155\"; EXAMPLEOFF=\"\33\133\155\"; DOLLAR=\"$\"" 1>&2 EXAMPLEON="\33\133\61\73\67\155" EXAMPLEOFF="\33\133\155" DOLLAR="$"