Updated SC2236 (markdown)

Eisuke Kawashima
2025-07-31 17:24:37 +09:00
parent a0e9f59070
commit 43393d220e

@@ -20,13 +20,15 @@ if [ -n "$STY" ]; then echo "You are already running screen"; fi
You have negated `test -z` or `test -n`, resulting in a needless double-negative. You can just use the other operator instead: You have negated `test -z` or `test -n`, resulting in a needless double-negative. You can just use the other operator instead:
# Identical tests to verify that a value is assigned ```sh
[ ! -z foo ] # Not has no value # Identical tests to verify that a value is assigned
[ -n foo ] # Has value [ ! -z foo ] # Not has no value
[ -n foo ] # Has value
# Identical tests to verify that a value is empty # Identical tests to verify that a value is empty
[ ! -n foo ] # Not is non-empty [ ! -n foo ] # Not is non-empty
[ -z foo ] # Is empty [ -z foo ] # Is empty
```
### Exceptions: ### Exceptions: