Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!tut.cis.ohio-state.edu!BBN.COM!jjd From: jjd@BBN.COM (James J Dempsey) Newsgroups: gnu.bash.bug Subject: "export foo=bar" bug Message-ID: <8907201503.AA17393@life.ai.mit.edu> Date: 20 Jul 89 15:03:03 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 34 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--