Steve Bertrand wrote:

To put it plainly, can anyone, if it's possible, provide a single line sed/awk pipeline that can:

To answer my own post, I found in some past notes something I drummed up quite a while ago that I can most certainly modify to suit my needs:

# Cat the tcpdump output file
# confirm that the source IP is NOT the mail server, and print the source IP/port
# separate the IP/port entries
# eliminate only the port and print IP
# clean out the spaces in the IP

cat tcpdump.txt | awk '{if ($3 != "192.168.100.204.25") print $3}' | \
awk '{FS = "."} {print $1,".",$2,".",$3,"."$4}' | sed s/" "//g

Steve
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to