bash basename dirname - ghdrako/doc_snipets GitHub Wiki

$ x=/tmp/a.b.c
$ basename $x
$ a.b.c
$ a=/tmp/a.b
$ basename $a
a.b
$ dirname $x
/tmp