input of while loop to come from output of `command`
- by Felipe Alvarez
#I used to have this, but I don't want to write to the disk
#
pcap="somefile.pcap"
tcpdump -n -r $pcap > all.txt
while read line; do
ARRAY[$c]="$line"
c=$((c+1))
done < all.txt
The following fails to work.
# I would prefer something like...
#
pcap="somefile.pcap"
while read line; do
ARRAY[$c]="$line"
c=$((c+1))
done <…