Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (s) sh(1)
-a file TRUE,ifle exists.
-b file TRUE,ifle exists and is a block-special le.
-c file TRUE,ifle exists and is a character-special
le.
-d file TRUE,ifle exists and is a directory.
-f file TRUE,ifle exists and is an ordinary le.
-g file TRUE,ifle exists and has its setgid bit set.
-G file TRUE,ifle exists and its group ID matches the effective group ID of this process.
-h file TRUE,ifle exists and is a symbolic link.
-k file TRUE,ifle exists and has its sticky bit set.
-L file TRUE,ifle exists and is a symbolic link.
-n string TRUE, if length of string is nonzero.
-o option
TRUE, if option named option is on.
-O file TRUE,ifle exists and is owned by the effective user ID of this process.
-p file TRUE,ifle exists and is a FIFO special le or a pipe.
-r file TRUE,ifle exists and is readable by current process.
-s file TRUE, if le exists and has size greater than 0 (zero).
-S file TRUE,ifle exists and is a socket.
-t file_des
TRUE,ifle descriptor number le_des is open and associated with a terminal device.
-u file TRUE,ifle exists and has its setuid bit set.
-w file TRUE,ifle *O exists and is writable by current process.
-x file TRUE,ifle exists and is executable by current process. If le exists and is a direc-
tory, then the current process has permission to search in the directory.
-z string TRUE, if length of string is 0 (zero).
file1 -nt file2
TRUE,ifle1 exists and is newer than le2.
file1 -ot file2
TRUE,ifle1 exists and is older than le2.
file1 -ef file2
TRUE,ifle1 and le2 exist and refer to the same le.
string = pattern
TRUE,ifstring matches pattern.
527188-007 Hewlett-Packard Company 829