endless loop in ksh

i have a ksh script like this:

#!/bin/ksh

for i in 1 2 3 4 5 6 7 8 9 10
do
something
done

now i want it loop endless when i value is from 1 to 10, so i add a loop like this:

#!/bin/ksh

loop:

for i in 1 2 3 4 5 6 7 8 9 10
do
something
done
goto loop

but this didn't work.how to make it work?
smiley020999Asked:
Who is Participating?
 
drosseelConnect With a Mentor Commented:
while true
do
   for i in 1 2 3 4 5 6 7 8 9 10
      do
         echo $i
      done
done
0
 
ozoCommented:
while [ 1 ] ; do
    for i in 1 2 3 4 5 6 7 8 9 10
    do
        echo $i
    done
done
0
 
kellyjjCommented:
ozo pretty much hit it on the head.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.