Skip to content

bash basename dirname

ghdrako edited this page Jan 11, 2023 · 2 revisions
$ x=/tmp/a.b.c
$ basename $x
$ a.b.c
$ a=/tmp/a.b
$ basename $a
a.b
$ dirname $x
/tmp

Test

Clone this wiki locally