From e2d5fa481f5d5aef53adc21f22a957018b6d39c5 Mon Sep 17 00:00:00 2001 From: Lucas Larson Date: Sat, 27 Sep 2025 22:48:52 -0400 Subject: [PATCH] comparing to a string better emulates Bash (`bash -c '(( "$(printf "%s\n" "0")" )); printf "%d\n" "$?"'` returns `1`) --- SC3006.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SC3006.md b/SC3006.md index c2941c6..fff2ef1 100644 --- a/SC3006.md +++ b/SC3006.md @@ -17,7 +17,7 @@ For POSIX compliance, use ```sh variable=1 -if [ "${variable}" -ne 0 ]; then +if [ "${variable}" != 0 ]; then echo variable is not zero fi ``` \ No newline at end of file