Pages

Friday, September 17, 2010

How to write infinite loop in Shell Script ?

There are several styles in writing infinite loop in programming languages,

C Style:

while (1){

//Implementation


}

Java Style:

while(true){


//Implementation


}

Python  Style:

while 1:

           //Implementation


Shell Script Style:

while [ 1 ]
do


//Implementation


done





No comments:

Post a Comment