BASENAME(1) User Commands BASENAME(1)

basename - return non-directory portion of a pathname

basename string [suffix]

Basename deletes the directory part of the filename-like string and prints the result. If suffix is specified, and suffix matches the last part of the result while characters remain, the matched portion of string is also deleted. /usr/5bin/basename and /usr/5bin/s42/basename interpret suffix as a simple regular expression as described in ed(1); /usr/5bin/posix/basename and /usr/5bin/posix2001/basename treat it as a fixed string.

See locale(7).
Determines the mapping of bytes to characters.

dirname(1), ed(1), sh(1), locale(7)

1/24/05 Heirloom Toolchest