#!/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"


相关文章:

  • 2021-05-21
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2021-07-02
猜你喜欢
  • 2021-06-15
  • 2021-12-28
  • 2021-09-13
  • 2021-08-14
  • 2021-10-05
  • 2021-08-15
  • 2022-03-08
相关资源
相似解决方案