Unexepcted behavior from read and cat

Jonathan McKeown jonathan+freebsd-questions at hst.org.za
Tue May 13 21:15:18 UTC 2008


[respecting Time's arrow]

On Tuesday 13 May 2008 20:55, Johan Dowdy wrote:
>
> On 5/12/08 1:55 PM, "RW" <fbsd06 at 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


More information about the freebsd-questions mailing list