Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2008 23:15:46 +0200
From:      Jonathan McKeown <jonathan+freebsd-questions@hst.org.za>
To:        freebsd-questions@freebsd.org
Subject:   Re: Unexepcted behavior from read and cat
Message-ID:  <200805132315.46288.jonathan%2Bfreebsd-questions@hst.org.za>
In-Reply-To: <C44F3242.9974D%jdowdy@ncircle.com>
References:  <C44F3242.9974D%jdowdy@ncircle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[respecting Time's arrow]

On Tuesday 13 May 2008 20:55, Johan Dowdy wrote:
>
> On 5/12/08 1:55 PM, "RW" <fbsd06@mlists.homeunix.com> wrote:
> >
> > cat iplist | xargs -n1 dig +short -x
>
> I think this one wins for brevity.

It can be made shorter:

<iplist xargs -n1 dig +short -x

but it fires off multiple dig processes.

Compare

lam -s-x\  iplist|xargs dig +short

which, even with a certain amount of cheating, is still 3 characters longer 
but only invokes dig once.

Jonathan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805132315.46288.jonathan%2Bfreebsd-questions>