Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy one! - How do i create an infinite loop???

Status
Not open for further replies.

JaybOt

Programmer
Apr 18, 2001
101
GB
Hi all,

can anyone tell me (or post an example) how i can create an infinite loop? variations welcome.

Sorry for sounding a bit dunce, i have been programming for many years and in many languages but i am new to shell programming and the usual application of commands like 'do/while', 'case', and 'if/then/else' do not seem to work as expected in the shell.

any help would be appreciated!

JayBot
"Always know what you say, but don't always say what you know!"
 
bash loops like this:

while (/bin/true)
do
echo "dont stop me now"
done

from the man-page:
Code:
true does nothing, successfully

;)
mbr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top