BASENAME(1B)

πŸ“¦ version 070715, in nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

Okay bestie, welcome to the basename page β€” specifically the 1B manual, BSD System Compatibility edition. It’s the (BSD) version, and its whole job is returning the non-directory portion of a pathname. Slay. πŸ’…


✨ SYNOPSIS ✨

/ucb/basename string [suffix]

πŸŽ€ DESCRIPTION πŸŽ€

So basename deletes the directory part of the filename-like string and prints whatever’s left. Iconic behavior, honestly.

If suffix is specified, and that suffix matches the last part of the result, then the matched portion of the fixed string is also deleted. That’s the whole trick. πŸ¦‹


πŸ”§ ENVIRONMENT VARIABLES πŸ”§

  • LANG, LC_ALL β€” see locale(7) for the locale lore. 🌍
  • LC_CTYPE β€” determines the mapping of bytes to characters. Literally the vibe check for bytes-to-chars. πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

Go hang out with these other manual pages, iykyk:


This page was brought to you by the Heirloom Toolchest, dated 9/22/03. 🫢✨ Periodt.

πŸ“¦ where this page comes from