From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <599f06db0608041203m351f1f7dkcb6c44f9d14b71d7@mail.gmail.com> References: <3d0bbd780608040237i5a944f1es6e73fbc2395403bd@mail.gmail.com> <44D31796.7050507@gmail.com> <676c3c4f0608040815s5cdddf17xb080bfeac5b0fcd9@mail.gmail.com> <599f06db0608041203m351f1f7dkcb6c44f9d14b71d7@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <02E129D3-32DF-41CC-9026-46BAA1FF8133@ar.aichi-u.ac.jp> Content-Transfer-Encoding: 7bit From: arisawa@ar.aichi-u.ac.jp Date: Wed, 9 Aug 2006 19:00:34 +0900 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: [9fans] Environment variable Topicbox-Message-UUID: 9ad2d132-ead1-11e9-9d60-3106f5b1d025 Hello 9fans, I found something weird about environment variable. term% a=alice term% b=$a term% xd -c /env/a 0000000 a l i c e 00 0000006 term% xd -c /env/b 0000000 a l i c e 00 0000006 term% OK. /env/a is same as /env/b as it should be. term% a='' # null string is assigned to a term% b=$a term% xd -c /env/a 0000000 00 0000001 term% xd -c /env/b 0000000 00 0000001 term% This is also OK. 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 term% xd -c $a xd: can't open term% OK I have not a file of $a term% xd -c $b xd is waiting a data from stdin! Bug or specification? Kenji Arisawa