From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Wed, 9 Aug 2006 21:09:20 -0500 To: 9fans@cse.psu.edu Subject: Re: [9fans] Environment variable In-Reply-To: <02E129D3-32DF-41CC-9026-46BAA1FF8133@ar.aichi-u.ac.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 9b4a5e00-ead1-11e9-9d60-3106f5b1d025 the "problem" is backquoting. you can see this clearly by distilling your example: ; a = '' ; b = `{cat /env/a} ; whatis b b: not found ; ls -l /env/^(a b) --rw-rw-rw- e 0 quanstro quanstro 1 Jul 6 19:33 /env/a --rw-rw-rw- e 0 quanstro quanstro 0 Jul 6 19:33 /env/b since backquoting always treats '\0' as an ifs character ; x = `{echo -n ''} is the same as ; x = () that is, ; ls -l /env/x --rw-rw-rw- e 0 quanstro quanstro 0 Jul 6 19:33 /env/x the only asymmetric thing to me is the fact that ; x = () sets /env/x, yet $x throws an error. (byron's rc does the opposite.) - erik On Wed Aug 9 05:01:18 CDT 2006, arisawa@ar.aichi-u.ac.jp wrote: > > term% b=`{cat /env/a} > term% xd -c /env/b > 0000000 > 0000000 > term% b=`{echo $a} > term% xd -c /env/b > 0000000 > 0000000 > term% b=`{echo ''} # echo null string > term% xd -c /env/b > 0000000 > 0000000 > term% > > ??? /env/b is empty ! not same as /env/a