Re: [PATCH v2] Replace instances of export VAR=VAL with VAR=VAL; export VAR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Wed, Nov 28, 2007 at 11:53:13PM +0100, David Kastrup wrote:
>
>> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux