Is there a database built into the base system

Andreas Perstinger andipersti at gmail.com
Sat Apr 8 19:11:33 UTC 2017


On 2017-04-08 19:35, Ernie Luzar wrote:
> I though "end" was end of line not end of file. So how should that awk
> command look to drop dups from the out put file?

A simple one-liner would be

awk '{ if ($1 != prev_ip) {print $1; prev_ip = $1} }' ip.org.sorted > 
output_file

As an alternative to the already mentioned AWK book, here's a short "Awk 
in 20 Minutes" tutorial:
http://ferd.ca/awk-in-20-minutes.html

Bye, Andreas


More information about the freebsd-questions mailing list