bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] Feature request -- field indices for split


From: forkandwait
Subject: [bug-gawk] Feature request -- field indices for split
Date: Mon, 23 Jan 2012 20:00:23 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hi excellent folks --

Could I suggest an extension to the fixed-width approach to splitting fields? 

It would be great to specify the column number which defines the data to be
split. For example, FIELDINDICES="1 10 12" would fill $1, $2, $3 with everything
from columns 1 thru 9, then columns 10 thru 11, then from column 12 to the end
of the line (respectively).

I know this is redundant with FIELDWIDTHS, but I think it is closer to how many
analysts think about data in a fixed width data file.  It also matches more
closely how other ETL languages do it.

I will probably work up a GAWK function to take indices and generate a
FIELDWITHS string, but that seems like a bit of a hack.

Thanks for the time and consideration!




reply via email to

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