

            arg (1) --- print command file arguments                 03/20/80


            _U_s_a_g_e

                 arg <argument_number> [ <level_offset> ]


            _D_e_s_c_r_i_p_t_i_o_n

                 'Arg'  is  used  from  within  a  shell  program to print an
                 argument specified on the command  line  that  invoked  that
                 shell program.  <Argument_number> is the ordinal position of
                 the  argument  desired.  (A value of zero corresponds to the
                 command name, one corresponds to the first  argument,  etc.)
                 <Level_offset>  is  used  to specify the number of levels of
                 nested input files and/or function  calls  that  are  to  be
                 skipped  before  fetching  the specified argument string.  A
                 value of zero means fetch the argument from the first higher
                 nesting level; one means skip one level to the second higher
                 level, etc.  The string thus obtained is printed on standard
                 output 1, followed by a newline.

                 Since 'arg' is typically used in a function  call  within  a
                 shell  program,  the default value of <level offset> is one,
                 so that the level corresponding  to  the  function  call  is
                 skipped and the shell program arguments are accessed.

                 If  <argument  number>  is  out  of  range for the specified
                 level, the empty string is returned and only  a  newline  is
                 printed.


            _E_x_a_m_p_l_e_s

                 print [arg 1]     # These two commands fetch the
                 arg 1 0           # same argument.

                 echo [arg 1] [arg 2] [arg 3]


            _S_e_e _A_l_s_o

                 args  (1),  nargs  (1),  getarg  (2),  _U_s_e_r_'_s  _G_u_i_d_e _f_o_r _t_h_e
                 _S_o_f_t_w_a_r_e _T_o_o_l_s _S_u_b_s_y_s_t_e_m _C_o_m_m_a_n_d _I_n_t_e_r_p_r_e_t_e_r
















            arg (1)                       - 1 -                       arg (1)


