help-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Feature request: Exception handling


From: Arthur G
Subject: Feature request: Exception handling
Date: Fri, 18 Nov 2022 11:16:48 +1100

Hello,

I've used AWK forever and currently use it to process massive FTP logs
which sometimes contain strings that make gawk crash.
E.g. When passing a field to gsub() and the field contains the [ open
square bracket character which gsub interprets as regex rather than a
literal.

I guess I could pre-filter that record out before invoking gawk but my
script already takes 8 hours to run. I guess you could even argue that
gsub() is not the right function for processing raw user data.

It would be cool if gawk had an exception handler that could be configured
to run a user specified gawk command or gawk function whenever an error
occurred when processing data allowing me to decide the next course of
action to take and continue with my processing if desired.

Currently gawk just just bombs out in this situation.

Thank you,
Arthur.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]