

            basename (1) --- select part of a pathname               02/22/82


            _U_s_a_g_e

                 basename [-(b | f | s | d | g)] { <pathname> }


            _D_e_s_c_r_i_p_t_i_o_n

                 'Basename'  is  the  function that knows about the syntax of
                 pathnames and can select various portions of the name  based
                 on  its  arguments.   It  obtains  input  pathnames from its
                 argument list, or from standard input if  no  arguments  are
                 specified,  and  prints  the selected components on standard
                 output.  Options control the portion of the file name selec-
                 ted as follows:

                       _O_p_t_i_o_n                 _S_e_l_e_c_t_s
                 
                    -b or none        the base file name only
                        -s            the file suffix only
                        -d            the directory path only
                        -f            the directory path and file name
                        -g            the file name and suffix only


            _M_e_s_s_a_g_e_s

                 "Usage:  basename ..."  for bogus arguments.


            _E_x_a_m_p_l_e_s

                 basename -s myprog.plg
                 cd [basename -d [file]]; [basename -g [file]]
                 ld [basename [file]].b -o [basename [file]]


            _S_e_e _A_l_s_o

                 take (1), drop (1), rot (1)



















            basename (1)                  - 1 -                  basename (1)


