Operating System - HP-UX
1834345 Members
1961 Online
110066 Solutions
New Discussion

ksh script to run particular times

 
SOLVED
Go to solution
jenith christopher
Occasional Advisor

ksh script to run particular times

Hi all,

I want to run the loop for particular times for example,

#!/bin/ksh

print "\n\nEnter the No of times to run: \c"

read TIME

.
.


If i am giving value 2 means the loop should run two times only..How to do that?

Help me please!!!

Regards,
Jenith Christopher.
2 REPLIES 2
Venkatesh BL
Honored Contributor
Solution

Re: ksh script to run particular times

#!/bin/ksh

print "\n\nEnter the No of times to run: \c"
read TIME
while [[ $TIME -ne 0 ]]
do
<<>>
((TIME=TIME-1))
done
jenith christopher
Occasional Advisor

Re: ksh script to run particular times

Hi,

Its working

Thanks a lot!!!!
Jenith Christopher