Syntax
- test
- test [!] [ -n | -z ] string
- test [!] { -b | -c | -d | -e | -f | -g | -h | -L | -p | -r | -S | -s | -u | -w | -x } file
- test [!] -t fd
- test [!] string { = | != } string
- test [!] integer { -eq | -ne | -gt | -ge | -lt | -le } integer
- [ ]
- [ [!] [ -n | -z ] string ]
- [ [!] { -b | -c | -d | -e | -f | -g | -h | -L | -p | -r | -S | -s | -u | -w | -x } file ]
- [ [!] -t fd ]
- [ [!] string { = | != } string ]
- [ [!] integer { -eq | -ne | -gt | -ge | -lt | -le } integer ]
If test(1)
is run without any arguments it returns false.
Reference