[Discuss] awk linux and ENVIRON
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Fri Jun 23 10:26:45 PDT 2006
On 2006-06-23 09:15-0700 p.willis at telus.net wrote:
>
>
> Hello,
>
> Does anyone know if ENVIRON actually works with linux?
> The only environment variable awk spits back to me
> is AWKPATH, whch usually indicates that the host
> operating system doesn't support environment variables.
>
> (?? linux has environment variables what's up ??)
>
> I didn't think one needed to set this up in the awk build...
Of course, under Linux to find out all environment variables simply run the
printenv command from the shell. From my awk man page, all those
environment variables should be automatically indexed by the ENVIRON
dictionary under awk. Whether that actually works for awk might depend on
the awk implementation (there are several including nawk), the shell, etc.
For example, from my awk man page it appears that the ENVIRON dictionary is
an extension beyond POSIX so that implies some awk implementations won't
have it.
It's been quite a while since I used awk so could you send a one-liner that
prints out the full contents of the ENVIRON dictionary so I can test whether
ENVIRON corresponds to the results of printenv on my awk/shell platform?
Others who are completely unfamiliar with awk might want to participate in
this test as well.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the Discuss
mailing list