From owner-freebsd-bugs Fri May 8 16:43:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA12650 for freebsd-bugs-outgoing; Fri, 8 May 1998 16:43:23 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA12606 for ; Fri, 8 May 1998 16:43:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id QAA14522; Fri, 8 May 1998 16:40:04 -0700 (PDT) Date: Fri, 8 May 1998 16:40:04 -0700 (PDT) Message-Id: <199805082340.QAA14522@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Jin Guojun (ITG staff) Subject: Re: bin/6557: /bin/sh && IFS Reply-To: Jin Guojun (ITG staff) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/6557; it has been noted by GNATS. From: Jin Guojun (ITG staff) 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