Core iTOps Tube

Thursday, 26 April 2012

display echo only once

lets say I am printing something out




Code:


echo "Please enter a valid username"

and its being printed out 5 times, is there any way I can limit to only being displayed ONCE. I tried echo -n but that just makes everything fit on one line.



Right now it keeps saying


Code:


Please enter a valid username

Please enter a valid username

Please enter a valid username

Please enter a valid username

Please enter a valid username

Please enter a valid username

Please enter a valid username


and I want it displayed only once



thanks




No comments:

Post a Comment