BASENAME(1) COMMAND REFERENCE BASENAME(1)
NAME
basename - strip filename affixes
SYNOPSIS
basename string [ suffix ]
DESCRIPTION
The basename command deletes any prefix ending in a slash
(/) and the suffix, if present, in string (from string) and
prints the result on the standard output. It is normally
used inside substitution marks (` `) in shell procedures.
EXAMPLES
This example compiles the named file and moves the output to
cat in the current directory:
cc /usr/src/cmd/cat.c
mv a.out `basename /usr/src/cmd/cat.c .c`
RETURN VALUE
[NO_ERRS] Command completed without error.
[USAGE] Incorrect command line syntax. Execution
terminated.
SEE ALSO
dirname(1), pathof(1), sh(1sh).
Printed 4/6/89 1
%%index%%
na:336,85;
sy:421,226;
de:647,493;
ex:1140,282;
rv:1422,271;
se:1693,181;
%%index%%000000000107