Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 May 2008 21:55:03 +0100
From:      RW <fbsd06@mlists.homeunix.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Unexepcted behavior from read and cat
Message-ID:  <20080512215503.42926695@gumby.homeunix.com.>
In-Reply-To: <5908E3FC770922A748B2301B@utd65257.utdallas.edu>
References:  <C1DFB4E8F62B503C9A829107@utd65257.utdallas.edu> <5908E3FC770922A748B2301B@utd65257.utdallas.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 May 2008 14:08:06 -0500
Paul Schmehl <pauls@utdallas.edu> wrote:

> --On Monday, May 12, 2008 13:59:47 -0500 Paul Schmehl
> <pauls@utdallas.edu> wrote:
> >
> > Sure, I can edit the file and prepend +short -x to each line, but
> > by then I might as well just do them individually.
> >
> > What am I missing?
> 
> Never mind.
> 
> This worked.
> 
> (read line; dig +short -x `echo $line`; while read line; do dig
> +short -x `echo $line`; done) < iplist
> 
I tend to use "xargs -n1" with dig e.g 


cat iplist | xargs -n1 dig +short -x




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080512215503.42926695>