9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa@ar.aichi-u.ac.jp
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] Environment variable
Date: Wed,  9 Aug 2006 19:00:34 +0900	[thread overview]
Message-ID: <02E129D3-32DF-41CC-9026-46BAA1FF8133@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <599f06db0608041203m351f1f7dkcb6c44f9d14b71d7@mail.gmail.com>

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




  reply	other threads:[~2006-08-09 10:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-04  9:37 [9fans] vmware? Anssi Porttikivi
2006-08-04  9:47 ` Lluís Batlle i Rossell
2006-08-04 15:15   ` Richard Bilson
2006-08-04 15:44     ` erik quanstrom
2006-08-07 22:14       ` Richard Bilson
2006-08-07 23:50         ` Federico Benavento
2006-08-04 19:03     ` Gorka guardiola
2006-08-09 10:00       ` arisawa [this message]
2006-08-09 11:03         ` [9fans] Environment variable Martin Neubauer
2006-08-09 11:16           ` arisawa
2006-08-09 11:27             ` Martin Neubauer
2006-08-09 11:36               ` arisawa
2006-08-09 11:39               ` Martin Neubauer
2006-08-09 12:04                 ` arisawa
2006-08-09 12:26                   ` Martin Neubauer
2006-08-09 12:39                     ` Martin Neubauer
2006-08-09 12:58                       ` arisawa
2006-08-09 13:22                         ` arisawa
2006-08-09 13:30                         ` Martin Neubauer
2006-08-10  2:15                         ` erik quanstrom
2006-08-09 12:03               ` [9fans] editor, man/less, dns setup, screen setup bituman
2006-08-09 12:08                 ` Martin Neubauer
2006-08-09 12:08                 ` Robert Raschke
2006-08-19  0:45                   ` Rodolfo (kix)
2006-08-10  2:09         ` [9fans] Environment variable erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02E129D3-32DF-41CC-9026-46BAA1FF8133@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).