Subject: Re: strange IFS behaviour in /bin/sh ?
To: None <current-users@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: current-users
Date: 05/10/2004 07:40:49
Darren Reed <avalon@caligula.anu.edu.au> typed:
: Trying this on 2.0_BETA..
:
: # IFS=:
: # set `grep root /etc/passwd`

This generally passes seven or more (*) arguments to set.

(*) if /chroot type entries or other "root" entries are returned

: # echo $1
: root
: # IFS=/
: # set /dev/wd1e

This passes one argument to set.

: # echo $1
:  dev wd1e

output is processed using IFS because you didn't enclose it with double
quotes.

# echo "$1"
/dev/wd1e

: ...is "/" a magical character for IFS ?
: Or is there a bug here ?

Doesn't seem so to me but maybe I've missed the point.

Regards,
-- 
Geoff Wing : <gcw@pobox.com>