[BusyBox] awk bug

Rob Landley rob at landley.net
Wed Apr 28 00:51:01 UTC 2004


On Friday 23 April 2004 18:42, Sauder, Vernon wrote:
> I think there is a bug in busybox awk.
>
> echo baudrate=9600 | awk -F= '{ print $2; }'
>
> This line should print "9600" (and does on RedHat) but on busybox (latest
> cvs, post pre10) it always prints "baudrate", no matter which token I ask
> it to print -- $1, $2, $3 or $4. The -F does not seem to play a difference.
> If the input is space separated, and -F is not given, the same output.
>
> I took a peek at the awk implementation but there was no hope of a quick
> diagnosis to an unfamiliar eye.

I have also peeked at the awk implementation and thrown up my hands for the 
moment.  A to-do item of mine after the 1.0 release is to rip apart and 
rewrite awk the way I ripped apart and rewrote sed.  I don't _want_ to do 
this, but nobody else seems interested and the awk we've got fails to work in 
a number of ways if you try to use it in a development environment.  (The 
./configure step uses awk pretty heavily in a lot of gnu packages...)

The down side of this is I'm going to have to learn awk.  (I dowanna learn 
awk.  It's icky.)  But I had to learn sed to fix sed, so I'm not worried 
about being _able_ to do it.

Rob




More information about the busybox mailing list