BASENAME(1)               BSD General Commands Manual              BASENAME(1)

NAME
     basename -- return filename portion of pathname

SYNOPSIS
     basename string [suffix]

DESCRIPTION
     basename deletes any prefix ending with the last slash ('/') or ':' character
     present in string, and a suffix, if given.  The resulting filename is
     written to the standard output.  A non-existent suffix is ignored.
     Suffix matching is not case sensitive on AROS.
     If suffix equals string, suffix is not stripped.

EXIT STATUS
     The basename utility exits 0 on success, and >0 if an error occurs.

EXAMPLES
     The following lines returns "tail":

           1> basename C:tail
           1> basename SYS:c/tail
           1> basename c/tail

SEE ALSO
     dirname

STANDARDS
     The basename utility is compliant with the IEEE Std 1003.1-2008
     (``POSIX.1'') specification.

BSD                             August 10, 2012                            BSD
