version 1, including all changes.
.
| Rev |
Author |
# |
Line |
| 1 |
perry |
1 |
TEST |
| |
|
2 |
!!!TEST |
| |
|
3 |
NAME |
| |
|
4 |
SYNOPSIS |
| |
|
5 |
DESCRIPTION |
| |
|
6 |
AUTHOR |
| |
|
7 |
REPORTING BUGS |
| |
|
8 |
COPYRIGHT |
| |
|
9 |
SEE ALSO |
| |
|
10 |
---- |
| |
|
11 |
!!NAME |
| |
|
12 |
|
| |
|
13 |
|
| |
|
14 |
test - check file types and compare values |
| |
|
15 |
!!SYNOPSIS |
| |
|
16 |
|
| |
|
17 |
|
| |
|
18 |
__test__ ''EXPRESSION''__ |
| |
|
19 |
[[__ ''EXPRESSION'' ]__ |
| |
|
20 |
test__ ''OPTION'' |
| |
|
21 |
!!DESCRIPTION |
| |
|
22 |
|
| |
|
23 |
|
| |
|
24 |
Exit with the status determined by EXPRESSION. |
| |
|
25 |
|
| |
|
26 |
|
| |
|
27 |
__--help__ |
| |
|
28 |
|
| |
|
29 |
|
| |
|
30 |
display this help and exit |
| |
|
31 |
|
| |
|
32 |
|
| |
|
33 |
__--version__ |
| |
|
34 |
|
| |
|
35 |
|
| |
|
36 |
output version information and exit |
| |
|
37 |
|
| |
|
38 |
|
| |
|
39 |
EXPRESSION is true or false and sets exit status. It is one |
| |
|
40 |
of: |
| |
|
41 |
|
| |
|
42 |
|
| |
|
43 |
( EXPRESSION ) |
| |
|
44 |
|
| |
|
45 |
|
| |
|
46 |
EXPRESSION is true |
| |
|
47 |
|
| |
|
48 |
|
| |
|
49 |
! EXPRESSION |
| |
|
50 |
|
| |
|
51 |
|
| |
|
52 |
EXPRESSION is false |
| |
|
53 |
|
| |
|
54 |
|
| |
|
55 |
EXPRESSION1 __-a__ EXPRESSION2 |
| |
|
56 |
|
| |
|
57 |
|
| |
|
58 |
both EXPRESSION1 and EXPRESSION2 are true |
| |
|
59 |
|
| |
|
60 |
|
| |
|
61 |
EXPRESSION1 __-o__ EXPRESSION2 |
| |
|
62 |
|
| |
|
63 |
|
| |
|
64 |
either EXPRESSION1 or EXPRESSION2 is true |
| |
|
65 |
|
| |
|
66 |
|
| |
|
67 |
[[-n] STRING |
| |
|
68 |
|
| |
|
69 |
|
| |
|
70 |
the length of STRING is nonzero |
| |
|
71 |
|
| |
|
72 |
|
| |
|
73 |
__-z__ STRING |
| |
|
74 |
|
| |
|
75 |
|
| |
|
76 |
the length of STRING is zero |
| |
|
77 |
|
| |
|
78 |
|
| |
|
79 |
STRING1 = STRING2 |
| |
|
80 |
|
| |
|
81 |
|
| |
|
82 |
the strings are equal |
| |
|
83 |
|
| |
|
84 |
|
| |
|
85 |
STRING1 != STRING2 |
| |
|
86 |
|
| |
|
87 |
|
| |
|
88 |
the strings are not equal |
| |
|
89 |
|
| |
|
90 |
|
| |
|
91 |
INTEGER1 __-eq__ INTEGER2 |
| |
|
92 |
|
| |
|
93 |
|
| |
|
94 |
INTEGER1 is equal to INTEGER2 |
| |
|
95 |
|
| |
|
96 |
|
| |
|
97 |
INTEGER1 __-ge__ INTEGER2 |
| |
|
98 |
|
| |
|
99 |
|
| |
|
100 |
INTEGER1 is greater than or equal to INTEGER2 |
| |
|
101 |
|
| |
|
102 |
|
| |
|
103 |
INTEGER1 __-gt__ INTEGER2 |
| |
|
104 |
|
| |
|
105 |
|
| |
|
106 |
INTEGER1 is greater than INTEGER2 |
| |
|
107 |
|
| |
|
108 |
|
| |
|
109 |
INTEGER1 __-le__ INTEGER2 |
| |
|
110 |
|
| |
|
111 |
|
| |
|
112 |
INTEGER1 is less than or equal to INTEGER2 |
| |
|
113 |
|
| |
|
114 |
|
| |
|
115 |
INTEGER1 __-lt__ INTEGER2 |
| |
|
116 |
|
| |
|
117 |
|
| |
|
118 |
INTEGER1 is less than INTEGER2 |
| |
|
119 |
|
| |
|
120 |
|
| |
|
121 |
INTEGER1 __-ne__ INTEGER2 |
| |
|
122 |
|
| |
|
123 |
|
| |
|
124 |
INTEGER1 is not equal to INTEGER2 |
| |
|
125 |
|
| |
|
126 |
|
| |
|
127 |
FILE1 __-ef__ FILE2 |
| |
|
128 |
|
| |
|
129 |
|
| |
|
130 |
FILE1 and FILE2 have the same device and inode |
| |
|
131 |
numbers |
| |
|
132 |
|
| |
|
133 |
|
| |
|
134 |
FILE1 __-nt__ FILE2 |
| |
|
135 |
|
| |
|
136 |
|
| |
|
137 |
FILE1 is newer (modification date) than FILE2 |
| |
|
138 |
|
| |
|
139 |
|
| |
|
140 |
FILE1 __-ot__ FILE2 |
| |
|
141 |
|
| |
|
142 |
|
| |
|
143 |
FILE1 is older than FILE2 |
| |
|
144 |
|
| |
|
145 |
|
| |
|
146 |
__-b__ FILE |
| |
|
147 |
|
| |
|
148 |
|
| |
|
149 |
FILE exists and is block special |
| |
|
150 |
|
| |
|
151 |
|
| |
|
152 |
__-c__ FILE |
| |
|
153 |
|
| |
|
154 |
|
| |
|
155 |
FILE exists and is character special |
| |
|
156 |
|
| |
|
157 |
|
| |
|
158 |
__-d__ FILE |
| |
|
159 |
|
| |
|
160 |
|
| |
|
161 |
FILE exists and is a directory |
| |
|
162 |
|
| |
|
163 |
|
| |
|
164 |
__-e__ FILE |
| |
|
165 |
|
| |
|
166 |
|
| |
|
167 |
FILE exists |
| |
|
168 |
|
| |
|
169 |
|
| |
|
170 |
__-f__ FILE |
| |
|
171 |
|
| |
|
172 |
|
| |
|
173 |
FILE exists and is a regular file |
| |
|
174 |
|
| |
|
175 |
|
| |
|
176 |
__-g__ FILE |
| |
|
177 |
|
| |
|
178 |
|
| |
|
179 |
FILE exists and is set-group-ID |
| |
|
180 |
|
| |
|
181 |
|
| |
|
182 |
__-h__ FILE |
| |
|
183 |
|
| |
|
184 |
|
| |
|
185 |
FILE exists and is a symbolic link (same as |
| |
|
186 |
__-L__) |
| |
|
187 |
|
| |
|
188 |
|
| |
|
189 |
__-G__ FILE |
| |
|
190 |
|
| |
|
191 |
|
| |
|
192 |
FILE exists and is owned by the effective group |
| |
|
193 |
ID |
| |
|
194 |
|
| |
|
195 |
|
| |
|
196 |
__-k__ FILE |
| |
|
197 |
|
| |
|
198 |
|
| |
|
199 |
FILE exists and has its sticky bit set |
| |
|
200 |
|
| |
|
201 |
|
| |
|
202 |
__-L__ FILE |
| |
|
203 |
|
| |
|
204 |
|
| |
|
205 |
FILE exists and is a symbolic link (same as |
| |
|
206 |
__-h__) |
| |
|
207 |
|
| |
|
208 |
|
| |
|
209 |
__-O__ FILE |
| |
|
210 |
|
| |
|
211 |
|
| |
|
212 |
FILE exists and is owned by the effective user |
| |
|
213 |
ID |
| |
|
214 |
|
| |
|
215 |
|
| |
|
216 |
__-p__ FILE |
| |
|
217 |
|
| |
|
218 |
|
| |
|
219 |
FILE exists and is a named pipe |
| |
|
220 |
|
| |
|
221 |
|
| |
|
222 |
__-r__ FILE |
| |
|
223 |
|
| |
|
224 |
|
| |
|
225 |
FILE exists and is readable |
| |
|
226 |
|
| |
|
227 |
|
| |
|
228 |
__-s__ FILE |
| |
|
229 |
|
| |
|
230 |
|
| |
|
231 |
FILE exists and has a size greater than zero |
| |
|
232 |
|
| |
|
233 |
|
| |
|
234 |
__-S__ FILE |
| |
|
235 |
|
| |
|
236 |
|
| |
|
237 |
FILE exists and is a socket |
| |
|
238 |
|
| |
|
239 |
|
| |
|
240 |
__-t__ [[FD] |
| |
|
241 |
|
| |
|
242 |
|
| |
|
243 |
file descriptor FD (stdout by default) is opened on a |
| |
|
244 |
terminal |
| |
|
245 |
|
| |
|
246 |
|
| |
|
247 |
__-u__ FILE |
| |
|
248 |
|
| |
|
249 |
|
| |
|
250 |
FILE exists and its set-user-ID bit is set |
| |
|
251 |
|
| |
|
252 |
|
| |
|
253 |
__-w__ FILE |
| |
|
254 |
|
| |
|
255 |
|
| |
|
256 |
FILE exists and is writable |
| |
|
257 |
|
| |
|
258 |
|
| |
|
259 |
__-x__ FILE |
| |
|
260 |
|
| |
|
261 |
|
| |
|
262 |
FILE exists and is executable |
| |
|
263 |
|
| |
|
264 |
|
| |
|
265 |
Beware that parentheses need to be escaped (e.g., by |
| |
|
266 |
backslashes) for shells. INTEGER may also be __-l__ |
| |
|
267 |
STRING, which evaluates to the length of |
| |
|
268 |
STRING. |
| |
|
269 |
!!AUTHOR |
| |
|
270 |
|
| |
|
271 |
|
| |
|
272 |
Written by FIXME: ksb and mjb. |
| |
|
273 |
!!REPORTING BUGS |
| |
|
274 |
|
| |
|
275 |
|
| |
|
276 |
Report bugs to |
| |
|
277 |
!!COPYRIGHT |
| |
|
278 |
|
| |
|
279 |
|
| |
|
280 |
Copyright 2000 Free Software Foundation, Inc. |
| |
|
281 |
This is free software; see the source for copying |
| |
|
282 |
conditions. There is NO warranty; not even for |
| |
|
283 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| |
|
284 |
PURPOSE. |
| |
|
285 |
!!SEE ALSO |
| |
|
286 |
|
| |
|
287 |
|
| |
|
288 |
The full documentation for __test__ is maintained as a |
| |
|
289 |
Texinfo manual. If the __info__ and __test__ programs |
| |
|
290 |
are properly installed at your site, the |
| |
|
291 |
command |
| |
|
292 |
|
| |
|
293 |
|
| |
|
294 |
__info test__ |
| |
|
295 |
|
| |
|
296 |
|
| |
|
297 |
should give you access to the complete manual. |
| |
|
298 |
---- |