Fix shellcheck for 2014/maffiodo2/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2024-01-28 12:11:34 -08:00
1 parent a717664483
commit 061c86ebf8
1 file changed
+19 -30
+19 -30
View File
@@ -15,44 +15,33 @@ make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "$ cat image.rgb | ./prog ' .,:;!$#@'" 1>&2
read -r -n 1 -p "Press any key to run command (space = next page, q = quit): "
echo "$ ./prog ' .,:;!$#@' < image.rgb" 1>&2
read -r -n 1 -p "Press any key to continue (space = next page, q = quit): "
echo 1>&2
./prog ' .,:;!$#@' < image.rgb | less -rEXFK
echo 1>&2
# ^-------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
# shellcheck disable=SC2002
cat image.rgb | ./prog ' .,:;!$#@' | less -EXF
echo "$ cat image.rgb | ./prog ' .:;Y0'" 1>&2
read -r -n 1 -p "Press any key to run command (space = next page, q = quit): "
echo "$ ./prog \" .:;Y0\" < image.rgb" 1>&2
read -r -n 1 -p "Press any key to continue (space = next page, q = quit): "
echo 1>&2
# ^-------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
# shellcheck disable=SC2002
cat image.rgb | ./prog " .:;Y0" | less -EXF
./prog " .:;Y0" < image.rgb | less -rEXFK
echo "$ cat image.rgb | ./prog ' :1'" 1>&2
read -r -n 1 -p "Press any key to run command (space = next page, q = quit): "
echo "$ ./prog ' :1' < image.rgb" 1>&2
read -r -n 1 -p "Press any key to continue (space = next page, q = quit): "
echo 1>&2
# ^-------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
# shellcheck disable=SC2002
cat image.rgb | ./prog ' :1' | less -EXF
./prog ' :1' < image.rgb | less -rEXFK
echo "$ cat image.rgb | ./prog ' .:;Y0'" 1>&2
read -r -n 1 -p "Press any key to run command (space = next page, q = quit): "
echo "$ ./prog ' .:;Y0' < image.rgb" 1>&2
read -r -n 1 -p "Press any key to continue (space = next page, q = quit): "
echo 1>&2
# ^-------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
# shellcheck disable=SC2002
cat image.rgb | ./prog ' .:;Y0' | less -EXF
./prog ' .:;Y0' < image.rgb | less -rEXFK
echo "$ cat image.rgb | ./prog ' .:-=+*#%@'" 1>&2
read -r -n 1 -p "Press any key to run command (space = next page, q = quit): "
echo "$ ./prog ' .:-=+*#%@' < image.rgb" 1>&2
read -r -n 1 -p "Press any key to continue (space = next page, q = quit): "
echo 1>&2
# ^-------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
# shellcheck disable=SC2002
cat image.rgb | ./prog ' .:-=+*#%@' | less -EXF
./prog ' .:-=+*#%@' < image.rgb | less -rEXFK
echo "$ cat image.rgb | ./prog ' .,:!-iots&8%#@$'" 1>&2
read -r -n 1 -p "Press any key to run command (space = next page, q = quit): "
echo "$ ./prog ' .,:!-iots&8%#@$' < image.rgb" 1>&2
read -r -n 1 -p "Press any key to continue (space = next page, q = quit): "
echo 1>&2
# ^-------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
# shellcheck disable=SC2002
cat image.rgb | ./prog ' .,:!-iots&8%#@$' | less -EXF
./prog ' .,:!-iots&8%#@$' < image.rgb | less -rEXFK