title: Parse interfaces from ifconfig
body: <p>I'm trying to get the list of networks interfaces from the command-line in this form:</p>
  
  <pre><code>"wlan0","eth0","lo"
  </code></pre>
  
  <p>I don't need to get them in a special order.</p>
  
  <p>I can do this:</p>
  
  <pre><code>wlan0,eth0,lo
  </code></pre>
  
  <p>with this super non-optimized command, after having searched a lot and after I think I've reached my limits:</p>
  
  <pre><code>ifconfig -a | grep -E '' | sed -n 's/^\([^ ]\+\).*/\1/p' | tr -d '\n' | sed s/:/,/g | sed 's/.$//' 
  </code></pre>