Date: Sat, 8 Apr 2017 21:11:28 +0200 From: Andreas Perstinger <andipersti@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: Is there a database built into the base system Message-ID: <c395c9ee-b9f9-33a8-1ebb-8fffcf9b3c03@gmail.com> In-Reply-To: <58E91F4D.90005@gmail.com> References: <58E696BD.6050503@gmail.com> <69607026-F68C-4D9D-A826-3EFE9ECE12AB@mac.com> <58E69E59.6020108@gmail.com> <20170406210516.c63644064eb99f7b60dbd8f4@sohara.org> <58E6AFC0.2080404@gmail.com> <20170407001101.GA5885@tau1.ceti.pl> <20170407210629.GR2787@mailboy.kipshouse.net> <58E83E19.8010709@gmail.com> <20170408145503.69ddf649@gumby.homeunix.com> <58E9171F.3060405@gmail.com> <20170408191633.70d1f303.freebsd@edvax.de> <58E91F4D.90005@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c395c9ee-b9f9-33a8-1ebb-8fffcf9b3c03>