Nicolas Williams writes:
> % print ${.sh.version}
> Version M 1993-12-28 s+
> % function d {
> typeset OIFS=$IFS
> typeset IFS='|'
> read line
> set -- $line
Oops! You just told it to break up the arguments twice.
Here's a better example:
$ ksh93 -p
$ echo 'a\:b:c'
a\:b:c
$ echo 'a\:b:c' | IFS=: read a b c
$ echo $a
a:b
$ echo $b
c
$ echo $c
$
It works fine.
--
James Carlson, Solaris Networking <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677