Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 May 1998 16:40:04 -0700 (PDT)
From:      Jin Guojun (ITG staff) <jin@george.lbl.gov>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/6557: /bin/sh && IFS
Message-ID:  <199805082340.QAA14522@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/6557; it has been noted by GNATS.

From: Jin Guojun (ITG staff) <jin@george.lbl.gov>
To: FreeBSD-gnats-submit@FreeBSD.ORG, dima@best.net
Cc:  Subject: Re: bin/6557: /bin/sh && IFS
Date: Fri, 8 May 1998 16:38:38 -0700 (PDT)

 >
 >>How-To-Repeat:
 >
 >        Try to run this script:
 >
 >        #!/bin/sh
 >        XXX=/1:/2:/3:
 >        IFS=:
 >        echo /0:$XXX
 >
 >        The expected result should be: "/0 /1 /2 /3"
 >        However, with current /bin/sh it's: "/0:/1 /2 /3"
 >
 >>Fix:
 >        
 >        Don't have one.
 
 It seems only IFS on variable, but no the argument. Need be fixed.
 
 This my temporary working around:
 
 #!/bin/sh
 XXX=/1:/2:/3:
 IFS=:
 tmp="/0:${XXX}"
 echo    $tmp
 
 
 This work-around solves many sh problems over different O.S.
 
 	-Jin
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805082340.QAA14522>