[r...@smartbridges:~ 1]# echo $LANG
C
[r...@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]:


[r...@smartbridges:~ 1]#

-----Original Message-----
From: Juergen Hennerich [mailto:[email protected]] 
Sent: Tuesday, October 13, 2009 5:26 PM
To: Teh Kok How
Cc: [email protected]
Subject: Re: busybox-1.15.2 awk broken

Teh Kok How wrote:
> [r...@smartbridges:~ 1]# awk -F: '{ print $1,$2,$3,$4,$5,$6,$7 }'

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

> [r...@smartbridges:~ 1]# echo $1
>
> [r...@smartbridges:~ 1]# echo '$1'
> $1
> [r...@smartbridges:~ 1]# echo "$1"
>
> [r...@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:
>
> [r...@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]:
>
>
> [r...@smartbridges:~ 1]#
>   
What is your locale setting (echo $LANG)?
What happens when you set $LANG to "C"?

Juergen

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to