busybox-1.15.2 awk broken

Stefan Seyfried stefan.seyfried at googlemail.com
Tue Oct 13 09:03:39 UTC 2009


On Tue, 13 Oct 2009 12:35:39 +0800
"Teh Kok How" <khteh at smartbridges.com> wrote:

> Hi;
> 	I have built util-linux's gawk for comparison and the result
> is the same. I suspect it has to do with ASH. Which shell did you use
> in your testing?

Could actually be true...


> [root at SmartBridges:~ 1]# gawk -F: '{ print $1 }' /etc/passwd
> root:x:0:0:root:/root:/bin/sh
> [root at SmartBridges:~ 1]# echo $SHELL
> /bin/sh
> [root at SmartBridges:~ 1]# echo $TERM
> xterm
> [root at SmartBridges:~ 1]# awk -F: '{ print $1 }' /etc/passwd
> root:x:0:0:root:/root:/bin/sh
> [root at SmartBridges:~ 1]# busybox awk -F: '{ print $1 }' /etc/passwd
> root:x:0:0:root:/root:/bin/sh
> [root at SmartBridges:~ 1]#

... if $1 is expanded even thout it should not, because you quoted it
correctly.

What does

echo '"$1"'

give on this system?
-- 
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."


More information about the busybox mailing list