[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Anomalous handling of last "field" in line
From: |
Aharon Robbins |
Subject: |
Re: Anomalous handling of last "field" in line |
Date: |
Sat, 04 Oct 2008 18:47:42 +0000 (UTC) |
Hi.
Someting like this should only happen if RS is not "\n". If RS is indeed
"\n" then there's a bug somewhere and you need to supply:
1. the version of gawk
2. the OS you are using
3. the compiler used to compile gawk
4. a small program and data file that reproduce the bug.
Thanks,
Arnold
In article <address@hidden>,
Christopher Durant <address@hidden> wrote:
>If $n is the last field in a line the it will contain a newline as
>its last character. This applies also if the line is "split" where
>e.g. split ($0, field) will extract a field[n] which terminates with
>a newline. length($n) correctly numbers the characters in the last
>field to include the newline character.
>
>This "feature" seems to have no benefits.
>
>Christopher
>
>
>
--
Aharon (Arnold) Robbins arnold AT skeeve DOT com
P.O. Box 354 Home Phone: +972 8 979-0381
Nof Ayalon Cell Phone: +972 50 729-7545
D.N. Shimshon 99785 ISRAEL