zoukankan      html  css  js  c++  java
  • 脚本2 (监控)

    #!/bin/sh
    echo  -n "Please enter the number of person from the server  :"
    read num
    n=`tail -n1 shuchu`
      if [ $n -eq $num ] ;   then  
       echo $num >> shuchu
      else
        echo $num >shuchu
      fi
     m=`wc -l shuchu|awk '{print $1}'`
      if [ $m -ge 5 ] && [ $m -le 20 ] ;    then
            if [ $n -eq 0 ]
                then
            echo "---------------------------------------------"
                   echo  -e "This group is 0 people and the $m times 0 \a  "
            fi
            if  [ $n -eq 500 ] ;               then
             echo "--------------------------------------------"
              echo -e  "This group is 500 people and the $m times 500 \a "
            fi
      fi
       if [ $m -ge 5 ] && [ $n -ne 0 ] && [ $n  -ne 500 ] ;   then
          echo "---------------------------------------------------"
          echo -e "This group is $n people and the $m times $n \a  "
       fi
       echo "The shell script run time : $SECONDS"


  • 相关阅读:
    创建数据库链
    redis命令
    redis.conf文件配置信息
    mybatis调用存储过程实现
    oracle游标使用遍历3种方法
    Proud Merchants
    Bag Problem
    Watch The Movie
    Accepted Necklace
    Bone Collector II
  • 原文地址:https://www.cnblogs.com/linuxer/p/2272524.html
Copyright © 2011-2022 走看看