Deal with shellcheck for 1994/ldb/try.sh
This commit is contained in:
1 parent
e227f77f59
commit
61aa66443f
1 file changed
+14
@@ -26,6 +26,14 @@ ldb_file()
|
|||||||
|
|
||||||
ldb_ioccc()
|
ldb_ioccc()
|
||||||
{
|
{
|
||||||
|
# This warning from ShellCheck is incorrect:
|
||||||
|
#
|
||||||
|
# SC2028 (info): echo may not expand escape sequences. Use printf.
|
||||||
|
#
|
||||||
|
# because we deliberately have \\n to show that there will be a newline printed
|
||||||
|
# WITH printf(1). Thus this does show correct output.
|
||||||
|
#
|
||||||
|
# shellcheck disable=SC2028
|
||||||
echo "$ printf \"The International Obfuscated C Code Contest\\nBest One-liner\\nby Laurion Burchall\" | ./ldb"
|
echo "$ printf \"The International Obfuscated C Code Contest\\nBest One-liner\\nby Laurion Burchall\" | ./ldb"
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
read -r -n 1 -p "Press any key to continue: "
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
@@ -33,6 +41,12 @@ ldb_ioccc()
|
|||||||
echo 1>&2
|
echo 1>&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This warning from ShellCheck is irrelevant as we only use 'i' as an iterator
|
||||||
|
# to do the commands a number of times:
|
||||||
|
#
|
||||||
|
# SC2034 (warning): i appears unused. Verify use (or export if used externally).
|
||||||
|
#
|
||||||
|
# shellcheck disable=SC2034
|
||||||
for i in $(seq 1 5); do
|
for i in $(seq 1 5); do
|
||||||
ldb_file /etc/passwd
|
ldb_file /etc/passwd
|
||||||
ldb_ioccc
|
ldb_ioccc
|
||||||
|
|||||||
Reference in new issue
Block a user