dig: single line
Patrick O'Callaghan
pocallaghan at gmail.com
Thu Mar 12 00:16:53 UTC 2009
On Thu, 2009-03-12 at 00:13 +0000, Mike -- EMAIL IGNORED wrote:
> On Wed, 11 Mar 2009 19:31:34 -0430, Patrick O'Callaghan wrote:
>
> > On Wed, 2009-03-11 at 23:32 +0000, Mike -- EMAIL IGNORED wrote:
> >> The head suggestion won't work, because in the above example, it is the
> >> second line I want.
> >
> > A trivial excercise for old Shell hands, e.g.
> >
> > program | head -n 2 | tail -n 1
> >
> > or
> >
> > program | sed -n 2p
> >
> > poc
>
> Yes, but the dig command sometimes returns the result
> on the first line, and sometimes on the second, so
> it is necessary to test what you get.
You haven't so far said which of the lines you are interested in.
Perhaps you can use grep on a pattern.
poc
More information about the fedora-list
mailing list