This is pretty neat, I think. I just discovered the second
thing below, by accident.
First, this one, which I've known for a while (and for which I
thank Mike Peeler):
LOG = `env`
But suppose you just want a list of all vars you've got
defined? Well, obviously we could take the above and run
it through sed. And then through sort.
Here's another way, though:
SHELL = /bin/sh
LOG = `dummy=; export $dummy`
All stripped and pre-sorted! Here's the output:
I'm going to use this at the end of some complex rcfiles I'm
writing in order to catalog all the vars I've created and placed
in use in that run. Then I can use the list to write my documentation,
show what namespace I've appropriated, etc.
(Note that the above is from a new, clean rcfile that has not had
any private env vars added yet.)
procmail mailing list Procmail homepage: http://www.procmail.org/