BASENAME(1)

NAME
basename - return non-directory portion of a pathname

SYNOPSIS
basename string [suffix]

DESCRIPTION
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/local/heirloom/usr/5bin/basename and /usr/local/heirloom/usr/5bin/s42/basename interpret suffix as a simple regular expression as described in ed(1); /usr/local/heirloom/usr/5bin/posix/basename and /usr/local/heirloom/usr/5bin/posix2001/basename treat it as a fixed string.

ENVIRONMENT VARIABLES

LANG, LC_ALL
    See locale(7).

LC_CTYPE
    Determines the mapping of bytes to characters.

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