You're replying to a comment by Todd Ramsey.

Todd Ramsey Permalink
October 28, 2013, 12:23


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

Here is the relevant code section for that:

cat /path/to/filename | while read -r aside bside
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

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 handle, if you have one.)

Type the word "server_325": (just to make sure you're a human)

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