含义: basename为shell,其作用为分离路径中的文件名。 如下: [root@redhat myshell]# basename /mydata/shell/myshell/getopts.sh getopts.sh