cat filename | awk '{print $3}' | perl -ne '$ip = $1 if /^(\d+\.\d+\.\d+\.\d+).*$/; print "$ip\n"' | sort | uniq
or to grab dest addresses substitute the fifth element
cat filename | awk '{print $5}' | perl -ne '$ip = $1 if /^(\d+\.\d+\.\d+\.\d+).*$/; print "$ip\n"' | sort | uniq
No comments:
Post a Comment