Unix/Linux Go Back    


BSD 2.11 - man page for basename (bsd section 1)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)


BASENAME(1)									      BASENAME(1)

NAME
       basename - strip filename affixes

SYNOPSIS
       basename string [ suffix ]

DESCRIPTION
       Basename  deletes  any  prefix  ending  in  `/' and the suffix, if present in string, from
       string, and prints the result on the standard output.  It is normally used inside  substi-
       tution marks ` ` in shell procedures.

       This  shell procedure invoked with the argument /usr/src/bin/cat.c compiles the named file
       and moves the output to cat in the current directory:

		      cc $1
		      mv a.out `basename $1 .c`

SEE ALSO
       sh(1)

7th Edition				  April 29, 1985			      BASENAME(1)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums


All times are GMT -4. The time now is 11:37 AM.