Thanks guys, That is exactly what I wanted. The output was to go to a text file which I could copy/paste into an SSH session. It would have been ideal to write this in Expect, as I could send the commands I want within the SSH session, but I didn't know how to do the loop with the variables. I think...