busybox-1.15.2 awk broken

Juergen Hennerich juergen at hennerich.eu
Tue Oct 13 09:23:38 UTC 2009


Teh Kok How wrote:
> [root at SmartBridges:~ 1]# awk -F: '{ print $1,$2,$3,$4,$5,$6,$7 }'

> [...........]
>   

> [root at SmartBridges:~ 1]# echo $1
>
> [root at SmartBridges:~ 1]# echo '$1'
> $1
> [root at SmartBridges:~ 1]# echo "$1"
>
> [root at SmartBridges:~ 1]#
>
> I put some printf in awk.c and the Fields[0-6] store the correct values when
> {print $1,$2,$3,$4,$5,$6} is used.
>
> However when '{print $1 }' is used, that code snippet(split_f0()) is not
> reached:
>
> [root at SmartBridges:~ 1]# awk -F: '{ print $1 }' /etc/passwd
> handle_special FS
> handle_special: intvar[F0]:
> handle_special: intvar[FS]:
> handle_special: intvar[NF]: 0
> handle_special RS
> handle_special: intvar[F0]:
> handle_special: intvar[FS]:
> handle_special: intvar[NF]: 0
> handle_special FS
> handle_special: intvar[F0]:
> handle_special: intvar[FS]: :
> handle_special: intvar[NF]: 0
> handle_special F0
> handle_special: intvar[F0]: root:x:0:0:root:/root:/bin/sh
> handle_special: intvar[FS]: :
> handle_special: intvar[NF]: 0
> L.v: root:x:0:0:root:/root:/bin/sh, R.v: 1.47882e-272
> L.v: root:x:0:0:root:/root:/bin/sh, R.v: 1.47882e-272
> root:x:0:0:root:/root:/bin/shintvar[OFS3]:
> intvar[OFS4]:
>
>
> [root at SmartBridges:~ 1]#
>   
What is your locale setting (echo $LANG)?
What happens when you set $LANG to "C"?

Juergen



More information about the busybox mailing list