While Loop bash / shell example

I really like to use this as the bash while loop is a control flow statement that allows code or commands to be executed repeatedly based on a given condition. 

while [ condition ]
do
   command1
done

i run this loop to show my EXIM mailq count every minute

while true; do date && echo -n "Inbound queue: " && exim -bpc && echo ;sleep 60 ;done
It's only fair to share...Tweet about this on TwitterShare on Google+Share on FacebookShare on LinkedInEmail this to someone
Twitter Auto Publish Powered By : XYZScripts.com