Mailinglist Archive: opensuse (3637 mails)

< Previous Next >
[OT SED AWK BASH] How to trim out a line ending?
  • From: wilson@xxxxxxxxxxx (Jonathan Wilson)
  • Date: Wed, 02 May 2001 13:41:54 -0500
  • Message-id: <>
Note: if my [OT] posts about sed/awk/bash/perl/grep upset anyone, please send me a message.

Ok, unfortunately nslookup spits out the desired info in 6 lines like such:


Non-authoritative answer:

[jw@garnet jw]$

In order to clean that up I need to remove the end-of-line/newline pair that /precedes/ each Address: line.

I also need to remove the blank line, but I don't know how to match either blank lines or line endings/newlines.

How do I match those?

P.S. Anyone have a link for a reg-exps for newbies howto? Sooner or later I'll read one of the big books, but at the moment I'm thinking of something more along the lines of a cheat sheet for quick lookups.

Jonathan Wilson
System Administrator

Cedar Creek Software
Central Texas IT

< Previous Next >