Updated SC2236 (markdown)

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

@@ -20,6 +20,7 @@ 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:
```sh
# Identical tests to verify that a value is assigned
[ ! -z foo ] # Not has no value
[ -n foo ] # Has value
@@ -27,6 +28,7 @@ You have negated `test -z` or `test -n`, resulting in a needless double-negative
# Identical tests to verify that a value is empty
[ ! -n foo ] # Not is non-empty
[ -z foo ] # Is empty
```
### Exceptions: