#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
以下因素未能奏效。
# I would prefer something like...
#
pcap="somefile.pcap"
while read line; do
ARRAY[$c]="$line"
c=$((c+1))
done < $( tcpdump -n -r "$pcap" )
谷歌成果太少(没有了解我想要找到的东西): 我愿保留“Bourne-compatible”(/bin/sh),但现在只有 持<>。