title: How to separate fields with pipe character delimiter
body: <p>I know this question has already been asked but no of the solution I've found worked for me! I have a program that has an output like this:</p>
  
  <pre><code>COUNT|293|1|lps
  </code></pre>
  
  <p>I'm interested in having the second field however no one of these tries worked:</p>
  
  <pre><code>./spawn 1 | cut -d '|' -f2
  ./spawn 1 | cut -d \| -f2
  ./spawn 1 | awk -F "|" '{print $2}'
  ./spawn 1 | awk 'BEGIN{FS="|"} {print $2}'
  ./spawn 1 | sed 's/|/;/g'
  ./spawn 1 | sed 's/\|/;/g'
  </code></pre>
  
  <p>But the output is always the same:</p>
  
  <pre><code>COUNT|293|1|lps
  </code></pre>
  
  <p>Is there a bug somewhere in bash? I would be surprised, the results is the same on my Linux host and on my embedded device using busybox's ash! Any pointer is strongly appreciated!</p>
  
  <p><strong>EDIT</strong>
  My fault, the output was in stderr ... ._.</p>
  
  <pre><code>./spawn 1 2&gt;&amp;1 | cut -d '|' -f2
  4615
  </code></pre>
  
  <p>Sorry for ennoying!</p>