mirror of
https://github.com/dylanaraps/pure-sh-bible
synced 2024-05-04 06:33:14 +02:00
docs: update
This commit is contained in:
parent
ea1864fd09
commit
3988ed31be
|
@ -511,7 +511,7 @@ Alternative to the `basename` command.
|
|||
|
||||
```sh
|
||||
basename() {
|
||||
# Usage: basename "path"
|
||||
# Usage: basename "path" ["suffix"]
|
||||
dir=${1%${1##*[!/]}}
|
||||
dir=${dir##*/}
|
||||
dir=${dir%"$2"}
|
||||
|
@ -526,6 +526,9 @@ basename() {
|
|||
$ basename ~/Pictures/Wallpapers/1.jpg
|
||||
1.jpg
|
||||
|
||||
$ basename ~/Pictures/Wallpapers/1.jpg .jpg
|
||||
1
|
||||
|
||||
$ basename ~/Pictures/Downloads/
|
||||
Downloads
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue