title: input of while loop to come from output of `command`
body: <pre><code>#I used to have this, but I don't want to write to the disk
  #
  pcap="somefile.pcap"
  tcpdump -n -r $pcap &gt; all.txt
  while read line; do  
    ARRAY[$c]="$line"
    c=$((c+1))  
  done &lt; all.txt  
  </code></pre>
  
  <p>The following fails to work.</p>
  
  <pre><code># I would prefer something like...
  #
  pcap="somefile.pcap"
  while read line; do  
    ARRAY[$c]="$line"
    c=$((c+1))  
  done &lt; $( tcpdump -n -r "$pcap" )
  </code></pre>
  
  <p>Too few results on Google (doesn't understand what I want to find :(  ). I'd like to keep it Bourne-compatible (/bin/sh), but it doesn't <em>have</em> to be.</p>