bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: might be a bug in gawk


From: Dave B
Subject: Re: might be a bug in gawk
Date: Wed, 25 Mar 2009 18:20:13 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090114)

Andrew J. Schorr wrote:
> On Tue, Mar 24, 2009 at 11:58:29PM -0400, joanes.polus wrote:
>>    execution of:
>>
>>    echo "a%28b%29%c"|awk -F "a" '{printf $2}'
>>
>>    give this result:
>>
>>    %28b%c
>>
>>    and not
>>
>>    %28b%29%c
>>
>>    So may be a bug or i do not understand something in awk.
> 
> Try using "print" instead of "printf" and you should get
> the desired result.

Agreed. However, I'd still expect to get a "not enough arguments to printf"
kind of error, which is not produced (whereas mawk and Bell labs awk do
complain if asked to run the OP's code).

-- 
D.




reply via email to

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