title: Using linux "cut" with stdin
body: <p>I'm trying to pipe data into "cut" to, say, cut away the first column of text. This works</p>
  
  <pre><code>$ cat test.txt | cut -d\  -f2-
  </code></pre>
  
  <p>Reading from stdin also works:</p>
  
  <pre><code>$ cut -d\  -f2- -
  ? doc/html/analysis.html
  ? doc/html/classxytree-members.html
  &lt;CTRL+D&gt;
  </code></pre>
  
  <p>However, as soon as a pipe is involved, it doesn't accept my <code>&lt;CTRL+D&gt;</code> anymore, and I can't signal "end of file":</p>
  
  <pre><code>$ cut -d\  -f2- - | xargs echo
  </code></pre>
  
  <p><strong>Update:</strong> This is apparently a bug in an old version of bash (3.00.15). It does work in more recent versions (tried 4.0.33 and 3.2.25). It would be nice to have some workaround, though, since I can't easily upgrade.</p>
  
  <hr>
  
  <p>Background: I've got a script/oneliner that gives me a condensed output of <code>cvs status</code> (I know, CVS...) in the form</p>
  
  <pre><code>? filename
  </code></pre>
  
  <p>e.g. for a file not committed yet. I'd like to be able to copy+paste parts of the output from that command and use this as an input to another command, that adds these files to cvs. Say:</p>
  
  <pre><code>$ cut -d\  -f2- | xargs cvs add
  &lt;paste lines&gt;
  &lt;CTRL-D&gt;        # &lt;-- doesn't work
  </code></pre>
  
  <p>Ideas?</p>