[mod.std.unix] TZ and TERM per process; V5N14

std-unix@ut-sally.UUCP (Moderator, John Quarterman) (01/10/86)

From: ukc!minster!forsyth
Date: Thu, 9 Jan 86 18:03:15 GMT

It can be helpful for TZ to be a per-process value (eg, in the
environment).  For instance, if I am logged in to a computer
several time zones away, with TZ set to reflect my local time,
I might say

	echo "echo go to the pub | write $NAME" | at 7pm

to get a message at 7pm my time, or (in the same session)

	TZ= at 3am <ada-testrun

to cause a long-running job to be started on the remote
system at a little-used time (their time).

Similarly, I might set TERM per process if I wish
to check the output of a supposedly terminal-independent
program for different terminal types:
	TERM=vt100 greeneking | vis
	TERM=520 greeneking | vis
	...
I might do something similar if running emulators in
different layers, though arguably that might be handled
by the ``per port'' notion.  (Although /etc/ttytype or
whatever is hard pressed to deal with people logging
in on different terminals on the same network or dial-in
port.)

There are other ways of doing these things,
but I find this compositional style more attractive
than, say, -l (local time) or -z (time zone) options
to `at' and other commands.
I'd be interested to see other approaches.

Volume-Number: Volume 5, Number 14