[ELDK] echo -e (busybox)

Detlev Zundel dzu at denx.de
Tue Jul 1 16:38:38 CEST 2008


Hi Giuseppe,

> On 1 Jul 2008 at 12:35, Detlev Zundel wrote:
>> Configuration of busybox?  The "-e" and "-n" support is configurable.
>
> I'm using the busybox binary in the SELF package of arm-2007-01-
> 21.iso (ELDK 4.1). I'm not sure about configuration of busybox.
>
>
>> Actually I just verified this with an ELDK-4.2 ramdisk:
>> 
>> ~ # echo -e "test\ntest"
>> test
>> test
>> ~ #
>> 
>> So what version of the ELDK SELF are you referring to?
>
> busybox-arm_trg-1.3.0-1.arm.rpm as inside arm-2007-01-27.iso ELDK 4.1
>
> I notice another thing:
>   root:/flnand/www/cgi-bin> echo -e "hello\nworld"
>   hellonworld
>   root:/flnand/www/cgi-bin> echo -e 'hello\nworld'
>   hello
>   world
> If I use double quotes, -e option doesn't work. If I use single 
> quote, it works. Could it be a issure related to the shell?

Hm, yes so it seems.  I see the same with an 4.1 SELF image on PowerPC:

root:~> echo -e "test\ntest"
testntest

This looks like the parsing of the shell is not quite ok.  Lets verify
that:

root:~> echo -e "test\\ntest"
test
test

Yes, this indeed seems to be a problem with shell parsing rules.  We
switched shell implementations between ELDK 4.1 to ELDK 4.2 from "msh"
to "ash", so this very likely contributes to this behaviour.  Msh seems
to be somewhat non-standard...

Cheers
  Detlev

-- 
I shall be telling this with a sigh / Somewhere ages and ages hence: /
Two roads diverged in a wood, and I-- / I took the one less traveled by, /
And that has made all the difference.              -- Robert Frost
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the eldk mailing list