I want a shell script to run 50 times.
So I google it and got the answer. I put it here as a notes.
The script is for bash shell.

#!/bin/bash
i=0
while [ $i -lt 50 ]; do
echo "It is a test"
let i=i+1
done

Please be careful when enter the command, the space between the while command.
I save it as bat.sh and give 755 permission.

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *