bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] error with two newline chars


From: Aharon Robbins
Subject: Re: [bug-gawk] error with two newline chars
Date: Sun, 12 Aug 2012 22:38:10 +0300
User-agent: Heirloom mailx 12.4 7/29/08

Hello. Thank you for your mail.

> From: ????????? ???????? <address@hidden>
> To: address@hidden
> Date: Sun, 12 Aug 2012 09:29:38 +0400
> Subject: [bug-gawk] error with two newline chars
>
> Hello!
>
> See the program -- err.awk.
>
> BEGIN {RS = ""} {printf "%s", $0}
>
> The data file (data.txt) consists of 4 chars: A \n \n B
>
> Run
>    gawk -f err.awk data.txt >newdata.txt
>
> The resulting file newdata.txt consists of 2 chars: A B -- all pairs of
> newlines are lost!
>
> The alone newlines are preserved.
>
> I'm using gawk 3.1.7 with Linux (Debian 6.0.2, Mandriva) and gawk 4.0.0
> (Open SUSE 12.1)
> 
> Regards

This is not a bug.  Gawk is behaving as documented. Please see:

http://www.gnu.org/software/gawk/manual/html_node/Multiple-Line.html#Multiple-Line

Thanks,

Arnold



reply via email to

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