随笔分类 -  shell

摘要:1.1 监控apache web server #! /bin/bash # apache netstat -anpt | grep 80 &> /dev/null if [ $? -eq 0 ];then str = "apache is running" else str = "apache i 阅读全文
posted @ 2018-02-27 15:54 不做大哥好多年 阅读(302) 评论(0) 推荐(0)
摘要:目录: 1.1 shell中常用运算符 1.2 使用if条件语句 1.3 shell 中的for循环 1.4 shell中的while循环语句 1.5 使用case分支语句 1.1 shell中常用运算符 返回顶部 1.2 使用if条件语句 返回顶部 1、单分支if语句 #!/bin/bash MO 阅读全文
posted @ 2018-02-27 08:04 不做大哥好多年 阅读(302) 评论(0) 推荐(0)
摘要:目录: 1.1 编写登录欢迎脚本 1.2 重定向与管道操作 1.3 使用shell变量 1.4 特殊的shell变量 1.5 read与echo使用比较 1.1 shell基础 返回顶部 1、系统变量 (1)新建脚本文件welcome.sh,用来输出各种监控信息。 [root@localhost ~ 阅读全文
posted @ 2018-02-26 15:15 不做大哥好多年 阅读(258) 评论(0) 推荐(0)