busybox-1.15.2 awk broken

Denys Vlasenko vda.linux at googlemail.com
Mon Oct 12 13:35:52 UTC 2009


On Mon, Oct 12, 2009 at 12:18 PM, Teh Kok How <khteh at smartbridges.com> wrote:
> Hi;
>
>             I am using busybox-1.15.2 and simple awk is broken as follows:
>
>
>
> -> awk -F"-" '{ print $1,$2 }' input.txt
>
> intvar[2]: -
>
> intvar[2]: -
>
> Hello-World Hello-World
>
> SmartBridges[0,0]-> cat input.txt
>
> Hello-World
>
> ->
>
>
>
>             The intvar is the printf() that I put in awk.c but apparently,
> the error here is that no matter what field separator I use in the input
> file, the print $1,$2 does not take the correct values from awk.

I don't see any incompatibility with GNU awk:

# cat input.txt
Hello-World
# ./busybox-1.15.2 awk -F"-" '{ print $1,$2 }' input.txt
Hello World
# ./busybox-git awk -F"-" '{ print $1,$2 }' input.txt
Hello World
# awk -F"-" '{ print $1,$2 }' input.txt
Hello World
# awk --version
GNU Awk 3.1.6a
Copyright (C) 1989, 1991-2007 Free Software Foundation.
...

--
vda


More information about the busybox mailing list