-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC3006
Joachim Ansorg edited this page Nov 15, 2021
·
2 revisions
variable=1
if ((variable)); then
echo variable is not zero
fi
bash
supports standalone ((..))
natively.
For POSIX compliance, use
variable=1
if [ "${variable}" -ne 0 ]; then
echo variable is not zero
fi