[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] abort keyword
From: |
Neil R. Ormos |
Subject: |
Re: [bug-gawk] abort keyword |
Date: |
Mon, 8 Jan 2018 10:53:44 -0600 (CST) |
address@hidden wrote:
> Changed the subject line.
> "Neil R. Ormos" <address@hidden> wrote:
>> But for shorter programs written for an ephemeral
>> need, an abort statement that does not require the
>> inclusion of library functions or additional -f
>> arguments, and a specific test in the END rule,
>> would save a lot of extra typing and design
>> attention. I write a lot of such one-off
>> programs, often on the command-line.
> I think a workable solution is a shell script
> that invokes gawk with the options and
> arguments previded, but that preloads useful
> things like abort, assert, etc.
That's a fine solution for situations where the
user is in a position to fully customize the
environment.
It's not optimal for some other use cases.
Examples include systems being built, where the
operating environment has not yet been customized;
recovery environments where the user's home
directory is broken or unavailable; and other
situations where the customization might interfere
with other uses of Gawk or simply confuse others.
When I don't need to rely on Gawk's exit status,
I've been using divide-by-zero as an expedient
abort. Having an abort keyword that, like exit,
allows the return code to be explicitly set, would
be better.
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, (continued)
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, Andrew J. Schorr, 2018/01/05
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, arnold, 2018/01/08
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, Andrew J. Schorr, 2018/01/08
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, arnold, 2018/01/08
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, Andrew J. Schorr, 2018/01/08
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, arnold, 2018/01/08
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, Andrew J. Schorr, 2018/01/08
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, Neil R. Ormos, 2018/01/08
- [bug-gawk] abort keyword, arnold, 2018/01/08
- Re: [bug-gawk] abort keyword, Andrew J. Schorr, 2018/01/08
- Re: [bug-gawk] abort keyword,
Neil R. Ormos <=
- Re: [bug-gawk] abort keyword, Arnold Robbins, 2018/01/11
- Re: [bug-gawk] abort keyword, Neil R. Ormos, 2018/01/12
- Re: [bug-gawk] abort keyword, Andrew J. Schorr, 2018/01/13
- Re: [bug-gawk] abort keyword, Neil R. Ormos, 2018/01/19
- Re: [bug-gawk] abort keyword, Andrew J. Schorr, 2018/01/19
- Re: [bug-gawk] abort keyword, arnold, 2018/01/20
- Re: [bug-gawk] abort keyword, Andrew J. Schorr, 2018/01/20
- Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, Manuel Collado, 2018/01/08
Re: [bug-gawk] inside awk script check that -M/--bignum given on command line?, arnold, 2018/01/05