Issue
I have a ridiculous question due to a ridiculous problem.
Normally if I want to get the contents of an environment variable in a UNIX shell, I can do
echo ${VAR}
Let's assume, due to my ridiculous situation, that this isn't possible.
How do I get the contents of an environment variable to stdout, without someone who is looking at the command itself (not the output), see the value of the environment variable?
I can picture the solution being something like echo env(NAME_OF_VAR)
although I can't seem to find it. The solution has to work in sh.
PS I can't write a script for this, it must be a built-in Unix command (I know, ridiculous problem).
Solution
You can do:
printenv VARIABLE_NAME
Answered By - user184968 Answer Checked By - Cary Denson (WPSolving Admin)