From adc93f6097615f16d57e8a24a256302f2144ec4e Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 17:37:50 +0000 Subject: cut out the html - they're going to cause diffing problems. --- man/man1/test.html | 156 ----------------------------------------------------- 1 file changed, 156 deletions(-) delete mode 100644 man/man1/test.html (limited to 'man/man1/test.html') diff --git a/man/man1/test.html b/man/man1/test.html deleted file mode 100644 index 0f3fa85d..00000000 --- a/man/man1/test.html +++ /dev/null @@ -1,156 +0,0 @@ - -test(1) - Plan 9 from User Space - - - - -
-
-
TEST(1)TEST(1) -
-
-

NAME
- -
- - test – set status according to condition
- -
-

SYNOPSIS
- -
- - test expr
-
-
-

DESCRIPTION
- -
- - Test evaluates the expression expr. If the value is true the exit - status is null; otherwise the exit status is non-null. If there - are no arguments the exit status is non-null. -
- - The following primitives are used to construct expr.
- −r file      True if the file exists (is accessible) and is readable.
- −w file      True if the file exists and is writable.
- −x file      True if the file exists and has execute permission.
- −e file      True if the file exists.
- −f file      True if the file exists and is a plain file.
- −d file      True if the file exists and is a directory.
- −s file      True if the file exists and has a size greater than zero.
- −t fildes     True if the open file whose file descriptor number is - fildes (1 by default) is the same file as /dev/cons.
- −A file      True if the file exists and is append-only.
- −L file      True if the file exists and is exclusive-use.
- −Tfile      True if the file exists and is temporary.
- s1 = s2     True if the strings s1 and s2 are identical.
- s1 != s2    True if the strings s1 and s2 are not identical.
- s1         True if s1 is not the null string. (Deprecated.)
- −n s1       True if the length of string s1 is non-zero.
- −z s1       True if the length of string s1 is zero.
- n1 −eq n2True if the integers n1 and n2 are arithmetically equal. - Any of the comparisons −ne, −gt, −ge, −lt, or −le may be used - in place of −eq. The (nonstandard) construct −l string, meaning - the length of string, may be used in place of an integer.
- a −nt b    True if file a is newer than (modified after) file b.
- a −ot b    True if file a is older than (modified before) file b.
- f −older tTrue if file f is older than (modified before) time - t. If t is a integer followed by the letters y(years), M(months), - d(days), h(hours), m(minutes), or s(seconds), it represents current - time minus the specified time. If there is no letter, it represents - seconds since epoch. You can also concatenate mixed units. - -
- - -
- - For example, 3d12h means three days and twelve hours ago. -
- - -
- -
- These primaries may be combined with the following operators:
- !         unary negation operator
- −o        binary or operator
- −a        binary and operator; higher precedence than −o
- (
expr )   parentheses for grouping. -
- - The primitives −b, −u, −g, and −s return false; they are recognized - for compatibility with POSIX. -
- - Notice that all the operators and flags are separate arguments - to test. Notice also that parentheses and equal signs are meaningful - to rc and must be enclosed in quotes.
- -
-

EXAMPLES
- -
- - Test is a dubious way to check for specific character strings: - it uses a process to do what an rc(1) match or switch statement - can do. The first example is not only inefficient but wrong, because - test understands the purported string "−c" as an option.
- -
- - if (test $1 '=' "−c") echo OK # wrong!
- -
-
- -
- A better way is
- -
- - if (~ $1 −c) echo OK
- -
-
- -
- Test whether abc is in the current directory.
- -
- - test −f abc −o −d abc
-
-
- -
-

SOURCE
- -
- - /usr/local/plan9/src/cmd/test.c
-
-
-

SEE ALSO
- -
- - rc(1)
- -
- -

-
-
- - -
-
-
-Space Glenda -
-
- - -- cgit v1.2.3