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"


  • 相关阅读:
    Codeforces Global Round 7 题解 (ABCDE)
    猫树 简单介绍
    pip模块
    协程
    多线程threading
    多进程multiprocessing
    DOM
    标签学习
    初步了解Bootstrap4
    初步了解jQuery
  • 原文地址:https://www.cnblogs.com/linuxer/p/2272524.html
Copyright © 2011-2022 走看看