[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Suspected bug in awk
From: |
Chris Savery |
Subject: |
Suspected bug in awk |
Date: |
Sun, 27 Mar 2011 21:23:42 +0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 |
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 :)
- Suspected bug in awk,
Chris Savery <=