title: sed not replacing lines
body: <p>I have a file with 1 line of text, called <code>output</code>. I have write access to the file. I can change it from an editor with no problems.</p>
  
  <pre><code>$ cat output
  1
  $ ls -l o*
  -rw-rw-r-- 1 jbk jbk 2 Jan 27 18:44 output
  </code></pre>
  
  <p>What I want to do is replace the first (and only) line in this file with a new value, either a 1 or a 0. It seems to me that sed should be perfect for this:</p>
  
  <pre><code>$ sed '1 c\ 0' output
   0
  $ cat output
  1
  </code></pre>
  
  <p>But it never changes the file. I've tried it spread over 2 lines at the backslash, and with double quotes, but I cannot get it to put a 0 (or anything else) in the first line.</p>