POSIX test command

GPTKB entity

Statements (44)
Predicate Object
gptkbp:instanceOf gptkb:graphical_user_interface
gptkbp:alsoKnownAs examination
[
gptkbp:availableOn gptkb:macOS
gptkb:Unix
gptkb:BSD
gptkb:Linux
Windows (via Cygwin, WSL, or similar)
gptkbp:category gptkb:POSIX_standard
Command-line utilities
Shell scripting
gptkbp:definedIn gptkb:POSIX.1_standard
gptkbp:documentation https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
gptkbp:exitStatus 0 if true
1 if false
gptkbp:hasOption =
!=
-d (directory)
-e (file exists)
-eq
-f (regular file)
-ge
-gt
-le
-lt
-n (non-zero-length string)
-ne
-z (zero-length string)
gptkbp:hasSyntax [ EXPRESSION ]
test EXPRESSION
https://www.w3.org/2000/01/rdf-schema#label POSIX test command
gptkbp:implementedIn gptkb:coreutils
shell built-in
gptkbp:introducedIn gptkb:Version_7_Unix
gptkbp:relatedTo gptkb:Bash
gptkb:Bourne_shell
gptkb:KornShell
gptkb:Zsh
gptkbp:usedFor string comparison
conditional expressions in shell scripts
file attribute testing
integer comparison
gptkbp:bfsParent gptkb:GNU_test
gptkbp:bfsLayer 7