[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] exit in BEGIN without trigger END
From: |
Peng Yu |
Subject: |
[bug-gawk] exit in BEGIN without trigger END |
Date: |
Wed, 28 Nov 2018 10:45:44 -0600 |
Hi,
I see the text from the manual below.
"""
When an exit statement is executed from a BEGIN rule, the program
stops processing everything immediately. No input records are read.
However, if an END rule is present, as part of executing the exit
statement, the END rule is executed (see BEGIN/END). If exit is used
in the body of an END rule, it causes the program to stop immediately.
"""
I am not sure this is necessarily the best default behavior. There are
cases in which users may want an `exit` from BEGIN not to trigger END.
Is there a good way to do so in awk? Thanks.
--
Regards,
Peng
- [bug-gawk] exit in BEGIN without trigger END,
Peng Yu <=