Help in while loop

view full story

http://www.unix.com – I have below code, that check abcd that is fine, when it not find abcd it check for 1 minutes that is also fine but i want one enhancement when it failed at the end it print "please check again" but if i add this line after fi statement it is constantly printing, i don't want that, please suggest. Code: tp=1 while [ $tp -le 2] do   echo   command=`ls -l |grep abcd`   if [ "$command" == "123" ]   then   echo "ok"   break   else   let tp++   sleep 30   echo "nook"   fi done (HowTos)