title: Extract unique IPs from live tcpdump capture
body: <p>I am using the following command to output IPs from live tcpdump capture</p>
  
  <pre><code>sudo tcpdump -nn -q ip -l | awk '{print $3; fflush(stdout)}' &gt;&gt; ips.txt
  </code></pre>
  
  <p>I get the following output</p>
  
  <pre><code>192.168.0.100.50771
  192.168.0.100.50770
  192.168.0.100.50759
  </code></pre>
  
  <p>Need 2 things:</p>
  
  <ol>
  <li>Extract only the IPs, not the ports.</li>
  <li>Generate a file with unique IPs, no duplicated, and sorted if posible.</li>
  </ol>
  
  <p>Thank you in advance</p>