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

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

Re: Suspected bug in awk


From: Aharon Robbins
Subject: Re: Suspected bug in awk
Date: Sun, 27 Mar 2011 20:37:43 +0200
User-agent: Heirloom mailx 12.4 7/29/08

Greetings. Re the below, it's a bug in 3.1.7 that is fixed in 3.1.8.
Alternatively, if you can live in the C locale:

        export LC_ALL=C         # place into .bashrc

then it will also work as expected.  Ubuntu needs to move to the
current version of gawk; it wouldn't hurt to file a report with them.

Thanks,

Arnold

> Date: Sun, 27 Mar 2011 21:23:42 +0700
> From: Chris Savery <address@hidden>
> To: address@hidden
> Subject: Suspected bug in awk
>
> Hello,
> I've tried everything and looked in several places to try and find why
> I'm getting this behavior.
> I want to use printf to truncate a string but it never works.
>
> Simple demo:
>
> echo "HellooThere" | awk '{printf "%.5s",$0}'
>
> prints
>
> HellooThere
>
> The . specifier for %s is supposed to truncate but seems to not work.
>
> Ubuntu 10.10
> GNU Awk 3.1.7
>
> Thanks for any input.
> Chris :)



reply via email to

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