Quote:
Originally Posted by
Don Cragun
The "program" in your 1st posting is not a valid shell script (although most shells will accept it without complaining. The only valid uses of break and continue are when they are used within a for loop, an until loop, or a while loop.
Don Cragun, I have intentionally written only the read,continue and break statements . I knew the code I wrote should be within a loop(while, for, until) then only 'continue' and 'break' makes sense. In awk also , if continue and break are written without loop, it will show error. I knew all these. I thought a reader would understand that I am writing a sub-part of a loop. So, I intentionally skipped writing the loop (while or for). It should have been tacitly understood that the code I wrote is a part of a loop because then only what I am saying becomes meaningful. If 'loop' was not in my mind and simply I am writing 'continue' and 'break', it makes no sense of what I am saying.
By the way, thanks for the examples. I will go through later.