[Novalug] Your REGEX query
Peter Larsen
plarsen@famlarsen.homelinux.com
Sun Jan 9 00:40:20 EST 2011
On Sat, 2011-01-08 at 02:20 -0500, Jon LaBadie wrote:
> Peter,
> I deleted your message before replying. So I'll
> send this on directly.
Sure.
> awk has a special construct for multi-line records
> separated by blank lines. You set the Record Separator
> to null. Here is an example that works with your data:
>
> awk '
> BEGIN { RS = "" }
>
> $NF == "dest1@someaddr.com" {
> print $1
> }
> ' data
I've never been too much of an awk fan, but that actually seems to work
and it isn't too large of a piece of code.
Thanks!
--
Best Regards
Peter Larsen
Wise words of the day:
A black cat crossing your path signifies that the animal is going somewhere.
-- Groucho Marx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20110109/39b837c8/attachment.asc>
More information about the Novalug
mailing list