title: Print list of ALL environment variables
body: <p>I would like to print a list of all <a href="http://en.wikipedia.org/wiki/Environment_variable" rel="nofollow noreferrer">environment variables</a> and their values. I searched the Stackoverflow and the following questions come close but don't answer me:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3806593/how-to-discover-what-is-available-in-lua-environment">How to discover what is available in lua environment?</a> (it's about Lua environment not the system environment variables)</li>
  <li><a href="https://stackoverflow.com/questions/2834579/print-all-local-variables-accessible-to-the-current-scope-in-lua">Print all local variables accessible to the current scope in Lua</a> (again about _G not the os environment variables)</li>
  <li><a href="http://www.lua.org/manual/5.1/manual.html#pdf-os.getenv" rel="nofollow noreferrer">http://www.lua.org/manual/5.1/manual.html#pdf-os.getenv</a> (this is a good function but I have to know the name of the environment variable in order to call it)</li>
  </ul>
  
  <p>Unlike C, Lua doesn't have <code>envp**</code> parameter that's passed to <code>main()</code> so I couldn't find a way to get a list of all environment variables. Does anybody know how I can get the <strong>list of the name and value of all <em>environment variables</em></strong>?</p>