bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Numeric Assignment to $0 Requires Coercion.


From: arnold
Subject: Re: [bug-gawk] Numeric Assignment to $0 Requires Coercion.
Date: Tue, 31 Jul 2018 00:50:27 -0600
User-agent: Heirloom mailx 12.4 7/29/08

This is definitely suprising. I will investigate.

Thanks,

Arnold

Ralph Corderoy <address@hidden> wrote:

> Hi,
>
> gawk 4.2.1-1 on Arch Linux.
>
>     $ yes a b c | sed 5q | awk '{$2 = ++i} 1'
>     a 1 c
>     a 2 c
>     a 3 c
>     a 4 c
>     a 5 c
>     $ yes a b c | sed 5q | awk '{$0 = ++i} 1'
>
>
>
>
>
>     $ yes a b c | sed 5q | awk '{$0 = ++i ""} 1'
>     1
>     2
>     3
>     4
>     5
>     $
>
> I wouldn't expect to have to force `++i' into a string context before
> the assignment to `$0'.  I do hope my awk skills haven't bit-rotted.
>
> -- 
> Cheers, Ralph.
> https://plus.google.com/+RalphCorderoy
>



reply via email to

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