BASENAME(1)
π NAME π
okay so BASENAME(1) is the manual page for basename, coming at you from the User Contributed Perl Documentation corner of the internet, and its whole mission is remove directory and suffix from filenames. Thatβs it. Thatβs the gig. π
β¨ SYNOPSIS β¨
basename string [suffix]
π¦ DESCRIPTION π¦
basename prints the file component of a path. Like, it looks at a path and hands you the filename part β main character behavior, honestly. A second argument to basename is interpreted as a suffix to remove from the file. And hereβs the chill part: it is not considered an error if the given suffix does not match the string. No drama, no side-eye, it just does its thing. π
πΈ OPTIONS πΈ
- No options, periodt.
basenamedoes not accept any options β not a single flag, not a sneaky little extra. π
π ENVIRONMENT π
The working of basename is not influenced by any environment variables. None. Zero. Itβs giving unbothered main character energy. β¨
π BUGS π
basename has no known bugs. Slay. No cap. π«Ά
β STANDARDS β
This basename implementation is compliant with the IEEE Std1003.2-1992 specification, also known as POSIX.2. Iconic behavior, lowkey. π
This basename implementation is compatible with the OpenBSD implementation. So yes, it plays nice. π
π AUTHOR π
The Perl implementation of basename was written by Abigail, perlpowertools@abigail.be. Give her the credit, bestie. π
π COPYRIGHT and LICENSE π
This program is copyright by Abigail 1999. π
This program is free and open software. You may use, copy, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others to do the same.
thatβs the whole page, bestie β mwah π this one is from perl v5.42.2, dated 2026-02-15. π¦π
π¦ where this page comes from
- alpine 3.24: perl-power-tools-doc 1.053-r1 Β· GPL-2.0-or-later AND Artistic-1.0-Perl AND Artistic-2.0 AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms