Quote:
Could we narrow it down please?
What do you mean? The more specific you are with your requests, the better are your chances of getting help with your issue.
The perl code above works like this:
It processes input line-by-line (-n switch), splits each line on whitespaces and stores the individual fields into @F array (-a switch). Then I am working with the ninth field, $F[8]. If the field is non-empty (its length is > 0 ) and its length is other than twelve, then it's changed to "000000000000". Then the whole array (line) is printed, whether changed or not.
Now what exactly you don't like about this? Maybe you want to change other fields than the ninth field or....? I encourage you to try to modify the code yourself -- that way you'll learn about the tool.
---------- Post updated at 02:20 AM ---------- Previous update was at 02:18 AM ----------
BTW i got a response to the bug report I filed regarding awk crash. Here is the relevant part of it:
Quote:
This is indeed a bug that shows up outside the "C" locale.
You can pull the current gawk code from the git repository on Savannah
(start at
http://savannah.gnu.org, put 'gawk' into the Project box
and follow the info for getting the code).
You can check out the gawk-stable branch, which has the problem fixed
and is closer to 3.1.6, or just build off the master branch which also
has the problem fixed.