You're replying to a comment by Todd Ramsey.

Todd Ramsey Permalink
October 28, 2013, 12:23

Hello,

I am trying to use the example in #6 to read a file with pairs of machine names to do a diff. The list looks like this:

machine1a machine1b
machine2a machine2b
etc.

Here is the relevant code section for that:

cat /path/to/filename | while read -r aside bside
do
echo $aside
echo $bside
echo $aside >> localDiffList
echo $bside >> localDiffList
diff <(ssh root@$aside '/bin/cat /path/to/configfile') <(ssh root@$bside '/bin/cat //path/to/configfile') >> localDiffList
echo >> localDiffList
done

The problem seems to be that after it reads the first pair I guess it gets a return of 0 and then exits out. How can I get this to read all of the lines in the file? Thanks.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.