Re: Unexepcted behavior from read and cat



On Mon, 12 May 2008 14:08:06 -0500
Paul Schmehl <pauls@xxxxxxxxxxxx> wrote:

--On Monday, May 12, 2008 13:59:47 -0500 Paul Schmehl
<pauls@xxxxxxxxxxxx> 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

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Unexepcted behavior from read and cat
    ... I think this one wins for brevity. ... Paul Schmehl wrote: ... Sure, I can edit the file and prepend +short -x to each line, but ...
    (freebsd-questions)
  • Re: File Manager
    ... | Paul Schmehl writes: ... |> I've always thought it was a bad idea to edit the passwd and groups ... To unsubscribe, ...
    (freebsd-questions)
  • Is there an easy way to rename all the files in a tree
    ... When I edit a photograph, I store the edit file in a directory tree that ... I would want to rename EditFile to D4-EditFile. ... I want to prepend D4- to an entire tree of files. ...
    (comp.sys.mac.apps)