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 >
Text File  |  1992-09-04  |  2KB  |  62 lines

  1. NAME
  2.     test - condition evaluation command
  3.  
  4. SYNOPSIS
  5.     test expr
  6.  
  7. DESCRIPTION
  8.     test evaluates the given expression and, if its value is true, returns
  9.     a zero (true) exit status; otherwise, a non-zero (false) exit status is
  10.     returned.
  11.  
  12.     All operators, operands and flags, must be separate arguments to the
  13.     test command; normally these items are separated by spaces.
  14.  
  15.     The following primitives are used to construct test :
  16.  
  17.     -r objects          true if all objects exist and are readable.
  18.  
  19.     -w objects          true if all objects exist, and are writable
  20.                   AND deletable.
  21.  
  22.     -x objects          true if all objects exist and are executable.
  23.  
  24.     -f objects          true if all objects exists and are files.
  25.  
  26.     -d objects          true if all objects exists and are directories.
  27.  
  28.     -s objects          true if all objects exists and have a size
  29.                   greater than zero.
  30.  
  31.     object1 -nt object2   true if object1 is newer than object2.
  32.  
  33.     object1 -ot object2   true if object1 is older than object2.
  34.  
  35.     -z string          true if the length of string is zero.
  36.  
  37.     -n string          true if the length of the string is not zero.
  38.  
  39.     s1 = s2           true if strings s1 and s2 are identical.
  40.  
  41.     s1 != s2          true if strings s1 and s2 are not identical.
  42.  
  43.     n1 -eq n2          true if the integers n1 and n2 are equal.
  44.                   Any of the comparisons -ne, -gt, -ge, -lt,
  45.                   and -le may be used in place of -eq.
  46.  
  47. RETURN CODES
  48.     0 if expression was true
  49.     1 in case of bad argument (fatal)
  50.     2 if expression was false
  51.     3 if memory couldn't be allocated (fatal)
  52.  
  53. CHANGES FROM UNIX
  54.     -c, -b, -p, -u, -g, -k, and -t switches not supported.
  55.     !, -a, -o operators, and parentheses not supported.
  56.     several objects can be specified for -r,-w,-x,-f,-d,-s switches
  57.  
  58. AUTHOR
  59.     Denis GOUNELLE
  60.     Last modified 04-Sep-92
  61.  
  62.