题号
- 1. 编写脚本,实现自动添加三个用户,并计算这三个用户的uid之和。
- 2. 编写脚本,计算/etc/passwd文件中第10个用户和第20个用户id号之和。
- 3. 将当前主机名保存至hostName变量中,主机名如果为空,或者为localhost。localdomain,则将主机名设置为CSDN。
- 4. 编写脚本,通过命令行参数传入一个用户名,判断id号是偶数还是基数。
- 5. 写一个脚本实现列出以下菜单给用户:一、disk:show disk info信息;二、mem:show memory info信息;三、cpu:show cpu info信息;四、quit。
- 6. 用bash实现统记访问日志文件中状态码大于等于400的IP数量并排序。