basename removes all leading directory components from the file name defined by
string. If the file name defined by
string has a suffix that ends in
suffix, it is removed as well.
If string consists solely of / characters the output will be a single / unless PATH_LEADING_SLASHES
returned by getconf(1) is 1 and string consists of multiple /
characters in which case // will be output. Otherwise, trailing / characters are removed, and if there are any
remaining / characters in string, all characters up to and including the last / are removed. Finally, if suffix
is specified, and is identical the end of string, these characters are removed. The characters not removed from string
will be written on a single line to the standard output.