Is this request based on a theoretical discussion, or is someone
actually using FIELDWIDTHS do real work?
Thanks,
Arnold
Ed Morton <address@hidden> wrote:
Could we get an extension for FIELDWIDTHS such that a "*" (or some other
indicator) means "everything else"? It's very common to have to deal with files
like:
foo bar stuff
bill johnny other stuff of some different length
where it's easy to see the length of the first 2 fields but the length of the
final field can't be determined based on any sample so we end up writing code
like:
FIELDWIDTHS = "5 7 9999"
and pick some arbitrary number that we hope will be big enough to hold whatever
appears in that 3rd field. It would be clearer and more robust if we could
instead write:
FIELDWIDTHS = "5 7 *"
or similar.
We've been having a discussion about the applicability of this at
https://groups.google.com/forum/#!topic/comp.lang.awk/uip6-Ll9Lj0 in case some
more background is useful.
Regards,
Ed.