test man page on Xenix

Man page or keyword search:  
man Server   1130 pages
apropos Keyword Search (all sections)
Output format
Xenix logo
[printable version]



     TEST(C)		      XENIX System V		       TEST(C)

     Name
	  test - Tests conditions.

     Syntax
	  test expr

	  [expr]

     Description
	  test evaluates the expression expr, and if its value is
	  true, returns a zero (true) exit status; otherwise, test
	  returns a nonzero 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      True if file exists and is writable.

	  -x file      True if file exists and is executable.

	  -f file      True if file exists and is a regular file.

	  -d file      True if file exists and is a directory.

	  -c file      True if file exists and is a character special
		       file.

	  -b file      True if file exists and is a block special
		       file.

	  -u file      True if file exists and its set-user-ID bit is
		       set.

	  -g file      True if file exists and its set-group-ID bit is
		       set.

	  -k file      True if file exists and its sticky bit is set.

	  -s file      True if 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 associated
		       with a terminal device.

	  -z s1	       True if the length of string s1 is zero.
		       Possible null length strings must be enclosed
		       in double quotation marks (").

	  -n s1	       True if the length of string s1 is nonzero.
		       Possible null length strings must be enclosed
		       in double quotation marks (").

     Page 1					      (printed 2/7/91)

     TEST(C)		      XENIX System V		       TEST(C)

	  s1=s2	       True if strings s1 and s2 are identical.

	  s1!=s2       True if strings s1 and s2 are not identical.

	  s1	       True if s1 is not the null string.

	  n1 -eqn2     True if the integers n1 and n2 are
		       algebraically equal.  Any of the comparisons
		       -ne, -gt, -ge, -lt, and -le may be used in
		       place of -eq.

	  These primaries may be combined with the following
	  operators:

	  !	       Unary negation operator

	  -a	       Binary and operator

	  -o	       Binary or operator  (-a	has higher precedence
		       than -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.

     See Also
	  find(C), sh(C)

     Warning
	  In the second form of the command (that is, the one that
	  uses [], rather than the word test), the square brackets
	  must be delimited by blanks.	That form of the command also
	  requires that the expression s1 = s2 contain a space on each
	  side of the ``='' and s1 != s2 contain a space before the
	  ``!'' and after the ``=''.

     Page 2					      (printed 2/7/91)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net