title: print environment variables sorted by name including variables with newlines
body: <p>I couldn't find an existing answer to this specific case: I would like to simply display all exported environment variables sorted by their name.  Normally I can do this like simply like:</p>
  
  <pre><code>$ env | sort
  </code></pre>
  
  <p>However, if some environment variables contain newlines in their values (as is the case on the CI system I'm working with), this does not work because the multi-line values will get mixed up with other variables.</p>