Date: Mon, 05 Oct 2015 05:35:53 -0400 From: Quartz <quartz@sneakertech.com> To: freebsd-questions@freebsd.org Subject: Re: awk question Message-ID: <56124479.9020505@sneakertech.com> In-Reply-To: <5611F776.9090701@hiwaay.net> References: <5611C922.4050007@hiwaay.net> <20151005042129.1f153ec6.freebsd@edvax.de> <5611F776.9090701@hiwaay.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> Funny you mention grep, I had a similar conversation on the NetBSD list > last week & everyone there suggested using awk alone to 'grep' out the > lines I wanted. Awk, sed, and various other utilities all have basic regex line matching, so if you're already calling them for some other feature then piping the output through grep first is kinda silly and inefficient. It's sorta like doing $(cat foo.txt | grep 'bar') instead of just $(grep 'bar' foo.txt). I suggested it mainly because it's easy to understand conceptually and because awk's syntax has something of a steep learning curve.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56124479.9020505>