3 basename, dirname \- strip off file prefixes and suffixes
5 \fBbasename \fIfile\fR [\fIsuffix\fR]\fR
19 .EX "basename /user/ast/file.c" "Strips path to yield \fIfile.c\fP"
20 .EX "basename /user/file.c .c" "Strips path and \fI.c\fP to yield \fIfile\fP"
21 .EX "dirname /user/file.c" "Strips basename to yield \fI/user\fP"
25 removes the initial directory names (if any) yielding the name of the
27 If a second argument is present, it is interpreted as a suffix and is
28 also stripped, if present.
31 removes the final component of a path, yielding the directory a file is in.
33 These programs are primarily used in shell scripts.