Syntax:
for var in <list> do <commands> done
example:
named='Zaki Live .Com' for nametame in $named do echo $nametame done
we can check at the end that loop is not working by this
named='Zaki Live .Com' for nametame in $named do echo $nametame done echo Voila La La
Another examples can be c like styles:
for (( c=1; c<=5; c++ )) do echo "Welcome $c times" done
Bash IF Else with for loop break and continue have to practice later time 🙂
Here is the video all for loop explained beautifully
References:
http://www.cyberciti.biz/faq/bash-for-loop/