Shell While command

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.

while [ $i -lt 50 ]; do
echo "It is a test"
let i=i+1

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

Buy me a coffee.
Your support help me to cover the cost of blogging. Thank you.
  • Archives