• 脚本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"


  • 相关阅读:
    zr#955 折纸
    zr#954 分组
    p2513 [HAOI2009]逆序对数列
    p4161 [SCOI2009]游戏
    p4593 [TJOI2018]教科书般的亵渎
    622FThe Sum of the k-th Powers
    spoj1811 LCS
    后缀自动机
    p5342 [TJOI2019]甲苯先生的线段树
    p5339 [TJOI2019]唱、跳、rap和篮球
  • 原文地址:https://www.cnblogs.com/linuxer/p/2272524.html
Copyright © 2020-2023  润新知