问轩博客

展开菜单

IF语句小练习

IF语句小练习
判断内存小于100,邮件报警[root@shnne ~]# sh baojing.sh  the mem is 570,it's ok. [root@shnne ~]# vim baojing.sh  #!/bin/sh memvalue=`free -m|awk 'NR==3 {print $...

比较两个整数的大小

比较两个整数的大小
#!/bin/sh #defined the number read -p "please input two number:" a b [ -z "$a" ] || [ -z "$b" ] && { &n...