.\" Copyright (c) 1990 The Regents of the University of California.
.\" %sccs.include.redist.man%
.\" @(#)basename.1 6.4 (Berkeley) %G%
.Nd return filename or directory portion of pathname
deletes any prefix ending with the last slash
The resulting filename is written to the standard output.
ends in the slash character,
A non-existant suffix is ignored.
deletes the filename portion, beginning
and writes the result to the standard output.
The following line sets the shell variable
.Dl FOO=`dirname /usr/bin/trail`
exit 0 on success, and >0 if an error occurs.
functions are expected to be POSIX 1003.2 compatible.