2018

1

Substitution, dirname, basename and suffix Substitution can be used to get path and short filename. filename=a/b/c/name.file echo ${filename#*/} # b/c/name.file echo ${filename##*/} # name.file echo ${filename%/*