Jeff King [off-list ref] writes:
On Wed, Nov 28, 2007 at 11:53:13PM +0100, David Kastrup wrote:
quoted
dak@lola:~$ ash
$ export JUNK=woozle
$ sh -c 'echo $JUNK'
woozle
$ exit
dak@lola:~$ dash
$ export JUNK=woozle
$ sh -c 'echo $JUNK'
woozle
$ exit
What problem are we talking about exactly, and with what shell?
$ uname -sr
FreeBSD 6.1-RELEASE-p17-jc1
$ /bin/sh
$ FOO='with spaces'
$ echo $FOO
with spaces
$ OK=$FOO; export OK
$ sh -c 'echo $OK'
with spaces
$ export BAD=$FOO
$ sh -c 'echo $BAD'
with
$ echo $BAD
with
I'd write
export BAD="$FOO"
anyhow. And also OK="$FOO" by the way. The alternatives scare me.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum