文件名(basename)
filepath=/home/abc/ahaha.txt
filename=`basename $filepath`
echo filename #Result: ahaha.txt
路径名(dirname)
filepath=/home/abc/ahaha.txt
dirname=`dirname $filepath`
echo dirname #Result: /home/abc
filepath=/home/abc/ahaha.txt
filename=`basename $filepath`
echo filename #Result: ahaha.txt
filepath=/home/abc/ahaha.txt
dirname=`dirname $filepath`
echo dirname #Result: /home/abc