davidbrit2 Licensed Computer Geek Nov 13, 2003 #1 How can I send the output of a command to a while loop. I can do so with a file doing this: while command do something done < /tmp/foo
How can I send the output of a command to a while loop. I can do so with a file doing this: while command do something done < /tmp/foo
btoneill keeper of the cheese Nov 18, 2003 #2 Is this what you are looking for: Code: cat /etc/hosts | while read foo; do echo $foo; done Brian
davidbrit2 Licensed Computer Geek Nov 18, 2003 #3 Hmm, I could have sworn I tried something like that, but maybe I'll play around with that setup again.
Hmm, I could have sworn I tried something like that, but maybe I'll play around with that setup again.