Is there a convention or perhaps utilities for doing this already?  I didn't see one doing quick look but I might have missed it.  

Note I copied the printenv command from a test above so I'll change both.