basename(3G)
basename - return the last element of a pathname
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME basename - return the last element of a pathname SYNOPSIS cc [flag ...] file ... -lgen [library ...] #include <libgen.h> char *basename (char *path); DESCRIPTION Given a pointer to a null-terminated character string that contains a pathname, basename returns a pointer to the last element of path. Trailing ``/'' characters are deleted. If path or *path is zero, pointer to a static constant ``.'' is returned. EXAMPLES Input string Output pointer _____________________________ /usr/lib lib /usr/ usr / / SEE ALSO basename(1), dirname(3G)