2019年11月6日 星期三

How to write a linux script with loop

How to write a linux script with loop


While true
do

XXXX (Command1)

sleep 2 
XXXX (Command2)


done

------------------------------------------
Add count with color


While true
do

XXXX (Command1)

sleep 2 
XXXX (Command2)

echo -e "\033[40;32m  "This is $count times." \033[0m"
count =$(($count+1))


done

沒有留言:

張貼留言

(TOP)Temp for soulin only

123