🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by James J Dempsey Thu, 20 Jul 1989 15:03
"export foo=bar" bug
#364
Author: James J Dempsey
Date: Thu, 20 Jul 1989 15:03
34 lines
1041 bytes
I always thought that the csh syntax of setting environment variables:

setenv foo bar

was a lot cleaner than sh syntax:

foo=bar
export foo

so I was overjoyed when someone on this list pointed out that in bash
you could say:

export foo=bar

which is just as clean as the csh syntax.  However, I seem to have
found a bug:

$ xxx='foo\bar'
$ echo $xxx
foo\bar
$
$ yyy=$xxx
$ echo $yyy
foo\bar
$ export zzz=$xxx
$ echo $zzz
foobar
$

The above script shows that if you use the "export foo=bar" notation
that backslashes in the right side are deleted.  This doesn't happen
if you use "foo=bar;export foo" notation.

		--Jim--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads