1BASENAME(1)                 General Commands Manual                BASENAME(1)
2
3
4

NAME

6       basename - strip filename affixes
7

SYNOPSIS

9       basename string [ suffix ]
10

DESCRIPTION

12       Basename deletes any prefix ending in `/' and the suffix, if present in
13       string, from string, and prints the result on the standard output.   It
14       is normally used inside substitution marks ` ` in shell procedures.
15
16       This  shell procedure invoked with the argument /usr/src/cmd/cat.c com‐
17       piles the named file and moves the output to cat in the current  direc‐
18       tory:
19
20                      cc $1
21                      mv a.out `basename $1 .c`
22

SEE ALSO

24       sh(1)
25
26
27
28                                                                   BASENAME(1)
Impressum