[BusyBox] bb ash IFS behaviour

arne @ loopback . org arne at matrix.loopback.org
Wed Aug 29 04:45:58 UTC 2001


Hi,

i just figured out a strange behaviour of IFS in ash, that is not the same
as it is in bash or the orig (0.3.5) ash:

her is my example script:

----------------------------------------------
#! /bin/sh

OIFS=$IFS
IFS=","
TEST="12 w 3 4 r 4 t,23 23 3 3"
for l in $TEST ; do
        IFS=$OIFS
        for z in $l ;do
                echo "z:$z"
        done
done

------------------------------------------------

using the bb ash it result in:
nil:/tmp# ./test.sh 
z:12 w 3 4 r 4 t
z:23 23 3 3

using the orig ash or bash:

nil:/tmp# ./test.sh 
z:12
z:w
z:3
z:4
z:r
z:4
z:t
z:23
z:23
z:3
z:3


any idea what is going on ? Is the initial IFS provided by the bb ash not
the same ?


regards,
	arne


-- 
-------------------------------------------------------------------­---
Arne Bernin                            	Netropol Digitale Systeme
					Lagerstrasse 30a                        
Tel: +49 4043250000                     D-20357 Hamburg/Germany
Fax: +49 4028416740   	                ab at Netropol.de    

-----------------------------------------------------------------------
                                                             
Fppmpppff mpmmmmfmm mfpmffmpppff pmfmppfmmmppppp pmpmmmpppppp mfffmmfmp
fmmmmfmfppmfmmmfmf!

    





More information about the busybox mailing list