Unexepcted behavior from read and cat
RW
fbsd06 at mlists.homeunix.com
Mon May 12 21:06:17 UTC 2008
On Mon, 12 May 2008 14:08:06 -0500
Paul Schmehl <pauls at utdallas.edu> wrote:
> --On Monday, May 12, 2008 13:59:47 -0500 Paul Schmehl
> <pauls at 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
More information about the freebsd-questions
mailing list