[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: might be a bug in gawk
From: |
Pierre Gaston |
Subject: |
Re: might be a bug in gawk |
Date: |
Thu, 26 Mar 2009 09:07:41 +0200 |
On Wed, Mar 25, 2009 at 5:58 AM, joanes.polus <address@hidden>wrote:
> hello,
>
> 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.
>
> Bye.
>
>
>
> -----------------------------------------------------------------------------------
> System:
> Archlinux 2008
>
> Hardware:
> Linux 2.6.28-ARCH
> i686 AMD Athlon(tm) XP 2800+ AuthenticAMD GNU/Linux
>
>
> This may have been lost into the discussion but whether
this is a bug or not, the first argument of printf is a formatting string
where some
special chars are interpreted and thus you should avoid putting data there,
ie in your case:
printf "%s",$2
- might be a bug in gawk, joanes.polus, 2009/03/25
- Re: might be a bug in gawk, Andrew J. Schorr, 2009/03/25
- Re: might be a bug in gawk, Dave B, 2009/03/25
- Re: might be a bug in gawk, Andreas Schwab, 2009/03/25
- Re: might be a bug in gawk, Dave B, 2009/03/25
- Re: might be a bug in gawk, Andreas Schwab, 2009/03/25
- Re: might be a bug in gawk, Micah Cowan, 2009/03/25
- Re: might be a bug in gawk, Dave B, 2009/03/26
- Re: might be a bug in gawk, Micah Cowan, 2009/03/25
Re: might be a bug in gawk, Jean-Michel ELYN, 2009/03/26
Re: might be a bug in gawk,
Pierre Gaston <=