1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.012.
2 .TH TEST "1" "August 1999" "GNU sh-utils 2.0" FSF
4 test \- check file types and compare values
16 .\" Add any additional description here
18 Exit with the status determined by EXPRESSION.
21 display this help and exit
24 output version information and exit
26 EXPRESSION is true or false and sets exit status. It is one of:
34 EXPRESSION1 \fB\-a\fR EXPRESSION2
35 both EXPRESSION1 and EXPRESSION2 are true
37 EXPRESSION1 \fB\-o\fR EXPRESSION2
38 either EXPRESSION1 or EXPRESSION2 is true
41 the length of STRING is nonzero
44 the length of STRING is zero
50 the strings are not equal
52 INTEGER1 \fB\-eq\fR INTEGER2
53 INTEGER1 is equal to INTEGER2
55 INTEGER1 \fB\-ge\fR INTEGER2
56 INTEGER1 is greater than or equal to INTEGER2
58 INTEGER1 \fB\-gt\fR INTEGER2
59 INTEGER1 is greater than INTEGER2
61 INTEGER1 \fB\-le\fR INTEGER2
62 INTEGER1 is less than or equal to INTEGER2
64 INTEGER1 \fB\-lt\fR INTEGER2
65 INTEGER1 is less than INTEGER2
67 INTEGER1 \fB\-ne\fR INTEGER2
68 INTEGER1 is not equal to INTEGER2
70 FILE1 \fB\-ef\fR FILE2
71 FILE1 and FILE2 have the same device and inode numbers
73 FILE1 \fB\-nt\fR FILE2
74 FILE1 is newer (modification date) than FILE2
76 FILE1 \fB\-ot\fR FILE2
77 FILE1 is older than FILE2
80 FILE exists and is block special
83 FILE exists and is character special
86 FILE exists and is a directory
92 FILE exists and is a regular file
95 FILE exists and is set-group-ID
98 FILE exists and is owned by the effective group ID
101 FILE exists and has its sticky bit set
104 FILE exists and is a symbolic link
107 FILE exists and is owned by the effective user ID
110 FILE exists and is a named pipe
113 FILE exists and is readable
116 FILE exists and has a size greater than zero
119 FILE exists and is a socket
122 file descriptor FD (stdout by default) is opened on a terminal
125 FILE exists and its set-user-ID bit is set
128 FILE exists and is writable
131 FILE exists and is executable
133 Beware that parentheses need to be escaped (e.g., by backslashes) for shells.
134 INTEGER may also be \fB\-l\fR STRING, which evaluates to the length of STRING.
136 Report bugs to <bug-sh-utils@gnu.org>.
138 The full documentation for
140 is maintained as a Texinfo manual. If the
144 programs are properly installed at your site, the command
148 should give you access to the complete manual.
150 Copyright \(co 1999 Free Software Foundation, Inc.
152 This is free software; see the source for copying conditions. There is NO
153 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.