views:

20

answers:

1

How do I exit out of an awk function? "exit" stops entire program?

+3  A: 

I think you want the return statement.

Carl Norum
I do not want to return anything, I just want to get out of there on certain condition. Possible?
hari
Aah, I can just do "return" and get out. But that way we are returning some junk. Anyways I guess this will do for me. Thanks much.
hari
@hari, returning junk is fine as long as you don't try to *use* that junk for something.
Carl Norum