Click to See Complete Forum and Search --> : Korn shell scripting help needed


Shag
07-12-2001, 02:30 PM
I am trying to figure out if there is a way to cease the current iteration of a while loop and move on to the next iteration. Like this (pseudo code):

while `cat file`; do
<processing>
if error
go to next line in 'file' and re-start loop
else
continue

I can't seem to figure out a way to do this. I know how to do it in Perl, but that won't help me here. :)

Anyone know if there is a built in routine for this? Or know a better place to ask?

Thanks.

bdg1983
07-12-2001, 04:24 PM
The Programming forum or try a web search for korn programming or korn scripts.

Any of the good Unix/Linux books should cover this. Try the free ones at Informit or O'Reilly's.