unix

bash while loop example

mulderu 2015. 11. 25. 14:15

ref : http://www.cyberciti.biz/faq/bash-while-loop/

bash while loop

#!/bin/bash
x=1
while [ $x -le 5 ]
do
  echo "Welcome $x times"
  x=$(( $x + 1 ))
done