- 19
- 0
- 约1.12万字
- 约 5页
- 2017-06-13 发布于湖北
- 举报
Blog: tomroom.cublog.cn UNIX(AIX) SHELL 编程实现系统检查脚本 进阶 实例 tomroom 环保男
UNIX(AIX) SHELL 编程实现系统检查脚本 进阶 实例
说明:Unix (aix )编程开头难,下面把常用系统检查命令脚本拆开逐个逐步解释,举一反
三
例子运行环境:IBM UNIX(AIX) 6.1 环境 ,2012-3-1 last update
1)wc 命令 (word count ) 可以统计file 或者 前面命令输出结果的行数或者字数
# df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 9636208 9% 13472 2% /
/dev/hd2 7340032 1283056 83% 49960 26% /usr
/dev/hd9var 4194304 2999928 29% 9555 3% /var
/dev/hd3 19% 472 1% /tmp
/dev/hd1 28% 77 1% /home
/dev/hd11admin 524288 523520 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 4328912 75% 71158 13% /opt
/dev/livedump 524288 523552 1% 4 1% /var/adm/ras/livedump
/dev/fslv00 1572864 497136 69% 97 1% /wujtest
/dev/fslv01 524288 523480 1% 11 1% /test
/dev/fslv02 4194304 4193008 1% 4 1% /nmon
/dev/fslv03 209715200 196829032 7% 1601 1% /doc
# df | wc -l
14
上面统计df 命令输出数量14 行
2 )sed 命令(stream edit )文件或者前面命令输出结果的字符串处理,用其中 1d 参
数可以去掉df 命令 运行结果的第一行表头。 sed 还可以字符替换并写入到另外一
个文件等操作,下面是man 附录信息
The sed command modifies lines from the specified File parameter
according to an edit script and writes them to standard output. The sed
command includes many features for selecting lines to be modified and
making changes only to the selected lines.
The sed command uses two work spaces for holding the line being
modified: the pattern space, where the selected line is
您可能关注的文档
最近下载
- 2026年高考全国II卷文科综合真题试卷(新课标卷)(+答案).docx VIP
- 安路科技(688107)补国产短板,突高端应用,拓新应用与技术大市场-240717-东北证券-38页.pdf VIP
- [搞笑小品剧本]上当了小品剧本.docx VIP
- 全国初中数学联合竞赛真题及答案(初二组)2015-年.pdf VIP
- 数据中心800V直流供电技术白皮书2.0.pdf
- 上海大学2022-2023学年第1学期《高等数学(上)》期末考试试卷(B卷)附参考答案.pdf
- 上海大学2022-2023学年第1学期《高等数学(上)》期末考试试卷(A卷)附参考答案.pdf
- 中国教育行业人才流动与薪酬水平_2025年12月.docx
- 2024全国初中数学联赛初二卷 .pdf VIP
- AIAG-VDA-SPC手册-Yellow-Volume2026年2月第一版 中文.pdf VIP
原创力文档

文档评论(0)