摘要: ```sh [root@localhost file1] ls a.htm b.htm c.htm d.htm pl.sh [root@localhost file1] vi pl.sh !/bin/bash for f in do mv $f done [root@localhost file1] 阅读全文
posted @ 2018-07-18 23:47 数据库BOSS 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 位置变量 $0代表命令本身 $1 $9代表顺序参数编号,大于10的话使用括号,如${10} $ 把所有参数当作整体 $@ 把每个参数分开对待 $ 所有参数的个数 举例说明: basename 是指脚本名字和 dirname 是指路径。 进程状态变量 1、$$获取当前shell的进程号(PID) 2、 阅读全文
posted @ 2018-07-18 22:39 数据库BOSS 阅读(189) 评论(1) 推荐(0) 编辑