D:\JavaFrameworks\InsuranceFramework\src\java\unix_code\UnixShell_Loops.properties
 1 # UNIX shell provides LOOP
 2 # For Loop
 3 # =======================================================
 4 for count in 1 2 3 4 5 6 7 8 9
 5     do
 6         echo $count
 7         # add you code
 8     done
 9 
10 # =======================================================
11 for OUTPUT in $(Linux-Or-Unix-Command-Here)
12 do
13         command1 on $OUTPUT
14         command2 on $OUTPUT
15         commandN
16 done
17 # while Loop
18 # =======================================================
19 count=1
20 while [ "$count"  le  10]
21     do
22         echo $count
23         count=`expr $count + 1`
24         # add you code
25     done
26 # while  Loop
27 # =======================================================
28 # CSH while loop Example
29 #!/bin/csh
30 c=1
31 while ( $c <= 5 )
32         echo "Welcome $c times"
33         @ c = $c + 1
34 end
35 # =======================================================
36 #!/bin/csh
37 set yname="foo"
38 while ( $yname != "" )
39         echo -n "Enter your name : "
40         set yname = $<
41         if ( $yname != "" ) then
42                 echo "Hi, $yname"
43         endif
44 end
45