[comp.text.tex] can you obtain UNIX environ. info in LaTeX?

vjcarey@SPHUNIX.SPH.JHU.EDU ("Vincent J. Carey") (04/05/91)

Hello.  Previously I posed a question about the possibility
of setting specific file-identification information in
the footer of a LaTeX document.  One reader pointed out
the \jobname command, which gets the name on which LaTeX
was invoked, and another reader sent the fancyheadings
package to help me set a footer.
 
These have been very helpful points, but it seems the
nature of my question was not very clear.  I really want
to be able to have documents be "self-identifying" in their
printed form.  The printed result should -- optionally, of
course -- contain a footer (or some other token) specifying
the hostname and absolute pathname of the .tex file from
which the print was derived.  This way, when hardcopy of a
document crosses my desk and needs changes, I will be better
equipped to find the source and make the changes.
 
I have a very inelegant way of doing this, which employs
a shell script which obtains values of environment variables
and seds the latex source to insert the information I
need.  I am not a fluent shell programmer, so the process
involves creation of a temporary file, and error recovery
is quite primitive.  Furthermore, my process relies upon
the existence of some comments in the preamble which are
targets for sed replacement.
 
My general question is: can one set values of LaTeX variables
to values of environment variables obtained at time
of LaTeX invocation?  If anyone else has made progress on
the problem of making latex output precisely self-identifying,
I would appreciate knowing about it.
 
P.S.  I will send a copy of my shell-script to any interested
party within mailing distance, but I do not feel it is ready for
general distribution.  Furthermore, I hope it can be supplanted
by a native method.
 
--
-------------------------------------------------------------------------
--
Vincent J. Carey
Department of Biostatistics
Johns Hopkins School of Public Health
 
vjcarey@sphunix.sph.jhu.edu