|
|
basename
用法:
basename NAME [SUFFIX]
basename OPTION
Print NAME with any leading directory components removed. If specified, also remove a trailing SUFFIX.
打印出去掉前面关于路径信息后的名称。
这里如 /usr/include/stdio.h 中,/usr/include 就是(leading directory),可翻译成前导目录。
应用举例:[root@localhost ~]# basename /usr/include/stdio.h
stdio.h 有上可见,先去掉 /usr/include 后再 stdio.h
假如这样:[root@localhost ~]# basename /usr/include/stdio.h hehe
stdio.h 连后面的 hehe 也去掉,这里也就是:If specified, also remove a trailing SUFFIX |
|