1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 14:46:00 +02:00

basename: change description and add directory example (#4528)

This commit is contained in:
Juri 2020-10-06 20:19:56 +02:00 committed by GitHub
parent 08286f6242
commit d22ac70ab4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,11 +1,15 @@
# basename
> Returns non-directory portion of a pathname.
> Remove leading directory portions from a path.
- Show only the file name from a path:
`basename {{path/to/file}}`
- Show only the rightmost directory name from a path:
`basename {{path/to/directory/}}`
- Show only the file name from a path, with a suffix removed:
`basename {{path/to/file}} {{suffix}}`