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