BASENAME(1) BASENAME(1) NAME basename - strip filename affixes SYNOPSIS basename string [ suffix ] DESCRIPTION _B_a_s_e_n_a_m_e deletes any prefix ending in ‘/’ and the _s_u_f_f_i_x_, if present in _s_t_r_i_n_g_, from _s_t_r_i_n_g_, and prints the result on the standard output. It is normally used inside substitution marks ` ` in shell procedures. This shell procedure invoked with the argument _/_u_s_r_/_s_r_c_/_b_i_n_/_c_a_t_._c com‐ piles the named file and moves the output to _c_a_t in the current direc‐ tory: cc $1 mv a.out `basename $1 .c` SEE ALSO sh(1) 7th Edition April 29, 1985 BASENAME(1)