首页 Linux

话不多说直接上jio本和效果

#!/bin/bash
   RED='\033[31m'
   BLUE='\033[34m'
   END='\033[0m'
   echo -en "$RED 红色:$END" 
   #sleep 3 

   while true 
   do
     red=$[$RANDOM%33+1]
    echo $redstring | grep -qw $red && continue
    echo -ne " $RED$red$END"
    redstring="$redstring $red"
   sleep 1
   [ `echo $redstring | awk "{print NF}"` -eq 6  ] && break
  done
  echo 
  echo -ne "$BLUE 篮球:$END \t"; sleep 1
  echo -e "$BLUE $[ $RANDOM%16+1 ] $END " 

效果:
1614222821(1).jpg


文章评论

评论已关闭