AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I
TEST ( 1 ) TEST (I) NAME test - condition evaluation command SYNOPSIS test expr [ expr ] DESCRIPTION Test evaluates the expression expr and, if its value is true, returns a zero (true) exit status; otherwise, a non-zero (false) exit status is returned; test also returns a non-zero exit status if there are no arguments. The following primitives are used to construct expr: -r file true if file exists and is readable. -w file -x file -f file -d file -c file -b file -p file -u file -g file -k file -s file -t [ fildes ] -z sl -n sl sl = s2 sl != s2 sl nl -eq n2 true if file exists and is writable. true if file exists and is executable. true if file exists and is a regular file. true if file exists and is a directory. true if file exists and is a character special file. true if file exists and is a block special file. true if file exists and is a named pipe (fifo). true if file exists and its set-user-ID bit is set. true if file exists and its set-group-ID bit is set. true if file exists and its sticky bit is set. true if file exists and has a size greater than zero. true if the open file whose file descriptor number is fildes (1 by default) is associated with a terminal device. true if the length of string sl is zero. true if the length of the string sl is non-zero. true if strings sl and s2 are identical. true if strings sl and s2 are not identical. true if sl is not the null string. true if the integers nl and n2 are algebraically equal. Any of the comparisons -ne, -gt, -ge, -It, and -le may be used in place of -eq. These primaries may be combined with the following operators: unary negation operator. binary and operator. -0 binary or operator ( -a. has higher precedence than -a. - o). ( expr ) parentheses for grouping. Notice that all the operators and flags are separate arguments to test. Notice also that parentheses are meaningful to the shell and, therefore, must be escaped. - 1 -
- Page 521 and 522: SH ( 1 ) word >> word
- Page 523 and 524: SH ( 1 ) SH ( 1) cd [ arg ] Change
- Page 525 and 526: SH (l) SH (l) Invocation . If the s
- Page 527 and 528: SHFORM (I) {AT&T UNIX PC only ) SHF
- Page 529 and 530: ( \ SHFORM(I) (AT&T UNIX PC only )
- Page 531 and 532: SIZE ( 1 ) SIZE ( 1) NAME size - pr
- Page 533: �· ! SLEEP (I) SLEEP (I) NAME sl
- Page 536 and 537: SORT(l) SORT(l) 0 The next argument
- Page 538 and 539: SPELL {l) SPELL (l) FILES spellin s
- Page 540 and 541: n__
- Page 543 and 544: STTY ( 1) STTY(l) NAME stty - set t
- Page 545: STTY ( 1) lfkc ( -lfkc) echonl ( -e
- Page 548 and 549: �· ·· .... . _ .....
- Page 550 and 551: �- . .�
- Page 552 and 553: � ·. ____ .
- Page 554 and 555: TABS (1) TABS ( 1) -u 1,12,20,44 UN
- Page 556 and 557: � \_ )
- Page 559 and 560: TAR ( 1 ) TAR ( 1) NAME tar - tape
- Page 561 and 562: TBL ( I ) TBL ( I ) NAME tbl - form
- Page 563 and 564: TBL(l) TBL(l) BUGS See BUGS under n
- Page 565: TC ( l ) TC ( l ) NAME tc - phototy
- Page 571: TEE(l) TEE(l) NAME tee - pipe fitti
- Page 575 and 576: TIME ( 1) TIME ( 1) NAME time - tim
- Page 577: TOUCH (!) TOUCH (!) NAME touch - up
- Page 581 and 582: TRUE ( ! ) NAME true, false - provi
- Page 583 and 584: TSET ( 1) {AT&T UNIX PC only ) TSET
- Page 585: TSORT ( l ) TSORT ( 1) NAME tsort -
- Page 588 and 589: � I I I I I I I II I I I I I I I
- Page 590 and 591: UAHELP (l) \US\ \BL\ \BS\ \EOT\ (AT
- Page 592 and 593: !�
- Page 595 and 596: UMODEM(l) UMODEM (l) NAME umodem -
- Page 597 and 598: UNAME(l) UNAME(l) NAME uname - prin
- Page 599: UNGET ( l ) UNGET ( l ) NAME unget
- Page 602 and 603: � \.,_ .:1 :� \__. ·
- Page 605 and 606: UUCP {IC) UUCP {IC) NAME uucp, uulo
- Page 607 and 608: UUSTAT (IC) UUSTAT ( IC ) NAME uust
- Page 609 and 610: UUTO (lC} UUTO (lC} NAME uuto, uupi
- Page 611 and 612: UUX ( lC ) UUX ( lC ) NAME uux - UN
- Page 613 and 614: VAL(l) VAL(I) NAME val - validate s
- Page 615 and 616: VC (l) VC (l) NAME vc - version con
- Page 617: VC (l) VC ( l ) ::text Used for key
- Page 620 and 621: VI ( 1) vi file vi vi + n file vi +
TEST ( 1 ) TEST (I)<br />
NAME<br />
test - condition evaluation command<br />
SYNOPSIS<br />
test expr<br />
[ expr ]<br />
DESCRIPTION<br />
Test evaluates the expression expr and, if its value is true, returns<br />
a zero (true) exit status; otherwise, a non-zero (false) exit status is<br />
returned; test also returns a non-zero exit status if there are no<br />
arguments. The following primitives are used to construct expr:<br />
-r file true if file exists and is readable.<br />
-w file<br />
-x file<br />
-f file<br />
-d file<br />
-c file<br />
-b file<br />
-p file<br />
-u file<br />
-g file<br />
-k file<br />
-s file<br />
-t [ fildes ]<br />
-z sl<br />
-n sl<br />
sl = s2<br />
sl != s2<br />
sl<br />
nl -eq n2<br />
true if file exists and is writable.<br />
true if file exists and is executable.<br />
true if file exists and is a regular file.<br />
true if file exists and is a directory.<br />
true if file exists and is a character special file.<br />
true if file exists and is a block special file.<br />
true if file exists and is a named pipe (fifo).<br />
true if file exists and its set-user-ID bit is set.<br />
true if file exists and its set-group-ID bit is set.<br />
true if file exists and its sticky bit is set.<br />
true if file exists and has a size greater than zero.<br />
true if the open file whose file descriptor number is<br />
fildes (1 by default) is associated with a terminal<br />
device.<br />
true if the length of string sl is zero.<br />
true if the length of the string sl is non-zero.<br />
true if strings sl and s2 are identical.<br />
true if strings sl and s2 are not identical.<br />
true if sl is not the null string.<br />
true if the integers nl and n2 are algebraically<br />
equal. Any of the comparisons -ne, -gt, -ge, -It,<br />
and -le may be used in place of -eq.<br />
These primaries may be combined with the following operators:<br />
unary negation operator.<br />
binary and operator.<br />
-0 binary or operator ( -a. has higher precedence than<br />
-a.<br />
- o).<br />
( expr ) parentheses for grouping.<br />
Notice that all the operators and flags are separate arguments to<br />
test. Notice also that parentheses are meaningful to the shell and,<br />
therefore, must be escaped.<br />
- 1 -