hpux man page for basename

Query: basename

OS: hpux

Section: 3c

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

basename(3C)															      basename(3C)

NAME
basename(), dirname() - extract components of a path name
SYNOPSIS
DESCRIPTION
takes the path name pointed to by path and returns a pointer to the final component of the path name, deleting any trailing '/' characters. If the string consists entirely of '/' characters, returns a pointer to the string "/". If path is a null pointer or points to the empty string, returns a pointer to the string ".". takes the path name pointed to by path and returns a pointer to a string that is a path name of the parent directory of that file. If path is a null pointer, points to the empty string, or does not contain a '/' character, then returns a pointer to the string ".".
RETURN VALUE
returns a pointer to the final component of path. returns a pointer to a string that is the parent directory of path.
EXAMPLES
The following code fragment calls and
WARNINGS
and may overwrite path. and in non-threaded applications currently use a static buffer in each function to hold the result string. Any subsequent calls to and may overwrite the static buffer. At some release after HP-UX 11i Version 1, HP may use to allocate the buffers. Once allocated, those buffers will be reused and their addresses will not change; however, if the fails, and would return "." and would be set to
AUTHOR
and were developed by HP.
SEE ALSO
basename(1), thread_safety(5).
STANDARDS CONFORMANCE
basename(3C)
Related Man Pages
dirname(3c) - opensolaris
dirname(3) - mojave
dirname(3) - redhat
basename(3c) - hpux
basename(3) - netbsd
Similar Topics in the Unix Linux Community
overwrite problem
geting the real path
problem with output of find command being input to basename command...
how to extract last occurence of the field
[Solved] Extracting all characters from a string