[ale] show distinct lines

Cade Thacker linux at cade.org
Wed Aug 21 11:34:38 EDT 2002


Sorry for the kinda easy question, but I am in a hurry and figures
somebody would know an easy answer to the question.

netstat -an | grep ESTABLISHED | <run some awk to strip out everything but
the incoming ips and remove their port number> | <take out the duplicates>
| nslookup

I have the awk part working, so is there an easy command to <take out
the duplicates> cause I am then going to run nslookup on these guys and
see who is coming into the box, and I don't want to see the same box
fifteen times.

NOTE: I know I can run netstat -a and get the names, but the names are not
what I want exactly, so this will not work.

TIA...

--cade

On Linux vs Windows
==================
Remember, amateurs built the Ark, Professionals built the Titanic!
==================




---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list