Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Apr 2008 14:27:31 +0200
From:      dino <dino@unitix.org>
To:        freebsd-hackers@freebsd.org
Subject:   bug in /bin/sh?!?
Message-ID:  <47F8C1B3.4030902@unitix.org>

next in thread | raw e-mail | index | archive | help
Hello,

on my FreeBSD 7.0-STABLE the line:

> sh -c 'set -- ${HOME+A B C}; echo "1:$1"; echo "2:$2:"; echo "3:$3:"'

prints

1:A B C:
2::
3::

I would rather expect:

1:A:
2:B:
3:C:

Is it correct that field splitting isn't performed on default/alternate
expanded values?

regards,

Corrado Ficicchia



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