basename命令的作用是获取脚本的名字

 

basename 作用:从给定的包含绝对路径的文件名中去除路径,然后返回剩下的文件名

 

[root@salt-client-192 sh1]# basename /root/sh1/n1.sh 
n1.sh

 

 

 

 

[root@localhost ~]# basename /usr/local/nginx/conf/nginx.conf  # 返回文件名部分
nginx.conf

 

相关文章:

  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
  • 2022-02-19
  • 2021-05-28
  • 2022-12-23
  • 2021-10-01
猜你喜欢
  • 2022-02-04
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
相关资源
相似解决方案