home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d7xx
/
d747
/
aush.lha
/
AUSH
/
ExtraCmds.lha
/
englishdocs
/
test.doc
< prev
next >
Wrap
Text File
|
1992-09-04
|
2KB
|
62 lines
NAME
test - condition evaluation command
SYNOPSIS
test expr
DESCRIPTION
test evaluates the given expression and, if its value is true, returns
a zero (true) exit status; otherwise, a non-zero (false) exit status is
returned.
All operators, operands and flags, must be separate arguments to the
test command; normally these items are separated by spaces.
The following primitives are used to construct test :
-r objects true if all objects exist and are readable.
-w objects true if all objects exist, and are writable
AND deletable.
-x objects true if all objects exist and are executable.
-f objects true if all objects exists and are files.
-d objects true if all objects exists and are directories.
-s objects true if all objects exists and have a size
greater than zero.
object1 -nt object2 true if object1 is newer than object2.
object1 -ot object2 true if object1 is older than object2.
-z string true if the length of string is zero.
-n string true if the length of the string is not zero.
s1 = s2 true if strings s1 and s2 are identical.
s1 != s2 true if strings s1 and s2 are not identical.
n1 -eq n2 true if the integers n1 and n2 are equal.
Any of the comparisons -ne, -gt, -ge, -lt,
and -le may be used in place of -eq.
RETURN CODES
0 if expression was true
1 in case of bad argument (fatal)
2 if expression was false
3 if memory couldn't be allocated (fatal)
CHANGES FROM UNIX
-c, -b, -p, -u, -g, -k, and -t switches not supported.
!, -a, -o operators, and parentheses not supported.
several objects can be specified for -r,-w,-x,-f,-d,-s switches
AUTHOR
Denis GOUNELLE
Last modified 04-Sep-92