title: Delete empty lines and trim surrounding spaces in Bash
body: <p>This command removes empty lines:</p>
  <pre><code>sed -e '/^$/d' file
  </code></pre>
  <p>But, how do I remove spaces from beginning and end of each non-empty line?</p>