title: using sed to edit /etc/fstab
body: <p>/etc/fstab line I want to edit:</p>
  
  <pre><code>/dev/appvg/home         /home     ext3    defaults        0 0
  </code></pre>
  
  <p>How do I get sed to insert ",nodev" behind the defaults column?</p>
  
  <p>I found this command in another post that inserts it before "defaults", and I can't figure out how get to insert after:</p>
  
  <pre><code>sed -ie 's:\(.*\)\(\s/home\s\s*\)\(\w*\s*\)\(\w*\s*\)\(.*\):\1\2\3nodev,\4\5:' /etc/fstab
  </code></pre>
  
  <p>which gives me this:</p>
  
  <pre><code>/dev/appvg/home         /home     ext3    nodev,defaults  0 0
  </code></pre>
  
  <p>This is how I want it to look like:</p>
  
  <pre><code>/dev/appvg/home         /home     ext3    defaults,nodev  0 0
  </code></pre>
  
  <p>Is it possible?  I'm new to sed...</p>