basename.1 (856B)
- .\" Collection of Unix tools, comparable to coreutils
 - .\" Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
 - .\" SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
 - .Dd 2021-04-05
 - .Dt BASENAME 1
 - .Os
 - .Sh NAME
 - .Nm basename
 - .Nd return last path compoment of a pathname
 - .Sh SYNOPSIS
 - .Nm
 - .Op Ar string
 - .Op Ar suffix
 - .Sh DESCRIPTION
 - When
 - .Ar string
 - isn't given
 - .Dq \&.
 - is returned.
 - Otherwise it gives the last path compoment of
 - .Ar string
 - with removing the last part matching
 - .Ar suffix
 - when applicable.
 - .Sh EXIT STATUS
 - .Ex -std
 - .Sh SEE ALSO
 - .Xr basename 3
 - .Sh STANDARDS
 - .Nm
 - is close but not compliant with the
 - .St -p1003.1-2008
 - specification as it uses
 - .Xr basename 3
 - directly instead of extracting the non-directory portion of
 - .Ar string
 - with it's own algorithm.
 - .Sh AUTHORS
 - .An Haelwenn (lanodan) Monnier Aq Mt contact@hacktivis.me