logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git

basename.1 (856B)


  1. .\" Collection of Unix tools, comparable to coreutils
  2. .\" Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. .\" SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
  4. .Dd 2021-04-05
  5. .Dt BASENAME 1
  6. .Os
  7. .Sh NAME
  8. .Nm basename
  9. .Nd return last path compoment of a pathname
  10. .Sh SYNOPSIS
  11. .Nm
  12. .Op Ar string
  13. .Op Ar suffix
  14. .Sh DESCRIPTION
  15. When
  16. .Ar string
  17. isn't given
  18. .Dq \&.
  19. is returned.
  20. Otherwise it gives the last path compoment of
  21. .Ar string
  22. with removing the last part matching
  23. .Ar suffix
  24. when applicable.
  25. .Sh EXIT STATUS
  26. .Ex -std
  27. .Sh SEE ALSO
  28. .Xr basename 3
  29. .Sh STANDARDS
  30. .Nm
  31. is close but not compliant with the
  32. .St -p1003.1-2008
  33. specification as it uses
  34. .Xr basename 3
  35. directly instead of extracting the non-directory portion of
  36. .Ar string
  37. with it's own algorithm.
  38. .Sh AUTHORS
  39. .An Haelwenn (lanodan) Monnier Aq Mt contact@hacktivis.me