From: lucio@proxima.alt.za
To: 9fans@cse.psu.edu
Subject: [9fans] Printenv(1)
Date: Sat, 8 May 2004 10:38:53 +0200 [thread overview]
Message-ID: <5e7092eca943af584d215efa3a8f1b9c@proxima.alt.za> (raw)
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
This makes it possible for me to test (and fix) ENV handling in Tcl.
Others may find it useful, I'm sure I should not have reinvented the
wheel, but it was quicker than looking up the wheel patent application
:-)
Add features to taste, I didn't even consult the Unix man pages.
++L
[-- Attachment #2: printenv.c --]
[-- Type: text/plain, Size: 310 bytes --]
#include <u.h>
#include <libc.h>
main (int argc, char **argv) {
int fd, x;
long nd;
Dir *buf;
USED(argc);
USED(argv);
fd = open ("#e", OREAD);
nd = dirreadall (fd, &buf);
for (x = 0; x < nd; x++) {
print ("%s=%s\n", buf[x].name, getenv (buf[x].name));
}
exits (0);
return 0;
}
next reply other threads:[~2004-05-08 8:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-08 8:38 lucio [this message]
2004-05-08 11:32 ` Richard Miller
[not found] <ee9e417a040508081457f3fe12@mail.gmail.com>
2004-05-11 18:41 ` rog
2004-05-11 19:06 ` Russ Cox
2004-05-11 19:16 ` rog
2004-05-12 5:18 ` lucio
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=5e7092eca943af584d215efa3a8f1b9c@proxima.alt.za \
--to=lucio@proxima.alt.za \
--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).