home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / shellutils-1.9.4-bin.lha / man / cat1 / test.0 < prev    next >
Text File  |  1993-12-07  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. TEST(1L)                                                 TEST(1L)
  5.  
  6.  
  7. NNAAMMEE
  8.        test - check file types and compare values
  9.  
  10. SSYYNNOOPPSSIISS
  11.        tteesstt [expr]
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.        This manual page documents the GNU version of tteesstt.
  15.  
  16.        tteesstt  returns  a status of 0 (true) or 1 (false) depending
  17.        on the evaluation  of  the  conditional  expression  _e_x_p_r.
  18.        Expressions may be unary or binary.  Unary expressions are
  19.        often used to examine the status of  a  file.   There  are
  20.        string operators and numeric comparison operators as well.
  21.  
  22.        --bb _f_i_l_e
  23.               True if _f_i_l_e exists and is block special.
  24.        --cc _f_i_l_e
  25.               True if _f_i_l_e exists and is character special.
  26.        --dd _f_i_l_e
  27.               True if _f_i_l_e exists and is a directory.
  28.        --ee _f_i_l_e
  29.               True if _f_i_l_e exists
  30.        --ff _f_i_l_e
  31.               True if _f_i_l_e exists and is a regular file.
  32.        --gg _f_i_l_e
  33.               True if _f_i_l_e exists and is set-group-id.
  34.        --kk _f_i_l_e
  35.               True if _f_i_l_e has its ``sticky'' bit set.
  36.        --LL _f_i_l_e
  37.               True if _f_i_l_e exists and is a symbolic link.
  38.        --pp _f_i_l_e
  39.               True if _f_i_l_e exists and is a named pipe.
  40.        --rr _f_i_l_e
  41.               True if _f_i_l_e exists and is readable.
  42.        --ss _f_i_l_e
  43.               True if _f_i_l_e exists and has  a  size  greater  than
  44.               zero.
  45.        --SS _f_i_l_e
  46.               True if _f_i_l_e exists and is a socket.
  47.        --tt [[_f_d]]
  48.               True if _f_d is opened on a terminal.  If _f_d is omit-
  49.               ted, it defaults to 1 (standard output).
  50.        --uu _f_i_l_e
  51.               True if _f_i_l_e exists and its set-user-id bit is set.
  52.        --ww _f_i_l_e
  53.               True if _f_i_l_e exists and is writable.
  54.        --xx _f_i_l_e
  55.               True if _f_i_l_e exists and is executable.
  56.        --OO _f_i_l_e
  57.               True  if  _f_i_l_e exists and is owned by the effective
  58.               user id.
  59.        --GG _f_i_l_e
  60.               True if _f_i_l_e exists and is owned by  the  effective
  61.  
  62.  
  63.  
  64.                                                                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TEST(1L)                                                 TEST(1L)
  71.  
  72.  
  73.               group id.
  74.        _f_i_l_e_1 -nntt _f_i_l_e_2
  75.               True  if  _f_i_l_e_1 is newer (according to modification
  76.               date) than _f_i_l_e_2.
  77.        _f_i_l_e_1 -oott _f_i_l_e_2
  78.               True if _f_i_l_e_1 is older than file2.
  79.        _f_i_l_e_1 --eeff _f_i_l_e
  80.               True if _f_i_l_e_1 and _f_i_l_e_2 have the  same  device  and
  81.               inode numbers.
  82.        --zz _s_t_r_i_n_g
  83.               True if the length of _s_t_r_i_n_g is zero.
  84.        --nn _s_t_r_i_n_g
  85.        _s_t_r_i_n_g True if the length of _s_t_r_i_n_g is non-zero.
  86.        _s_t_r_i_n_g_1 == _s_t_r_i_n_g_2
  87.               True if the strings are equal.
  88.        _s_t_r_i_n_g_1 !!== _s_t_r_i_n_g_2
  89.               True if the strings are not equal.
  90.        !! _e_x_p_r True if _e_x_p_r is false.
  91.        _e_x_p_r_1 -aa _e_x_p_r_2
  92.               True if both _e_x_p_r_1 and _e_x_p_r_2 are true.
  93.        _e_x_p_r_1 -oo _e_x_p_r_2
  94.               True if either _e_x_p_r_1 or _e_x_p_r_2 is true.
  95.        _a_r_g_1 OOPP _a_r_g_2
  96.               OOPP  is  one  of  --eeqq,  --nnee,  --lltt, --llee, --ggtt, or --ggee.
  97.               These arithmetic binary operators  return  true  if
  98.               _a_r_g_1  is equal, not-equal, less-than, less-than-or-
  99.               equal, greater-than, or greater-than-or-equal  than
  100.               _a_r_g_2,  respectively.  _a_r_g_1 and _a_r_g_2 may be positive
  101.               integers, negative integers, or the special expres-
  102.               sion  --ll  _s_t_r_i_n_g,  which evaluates to the length of
  103.               _s_t_r_i_n_g.
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                                                 2
  131.  
  132.  
  133.