On 2/22/07, John Summerfield <[EMAIL PROTECTED]> wrote:
If you want to do the same to several hosts: for h in host1 host2 do ssh $h <commandline> done The list of hosts can be read from a file with $(cat <some filename>) or generated in some other way, and if the list is to big for that, then cat list | while read h ; do ... ; done
Oh yes, indeed... and that's another reason to appreciate the single command working on files rather than think hard about how to deal with redirection in the remote command. You're probably not surprised I ended up several times with one new file on the workstation rather than one on each of the remote hosts ;-) Works great when you clone the servers and they all have the same host keys ... <slam> <slam> When I was running 100+ Linux virtual machines on my P/390, I started with a "forall" script that issued the command on each of them. But waking up all the servers at the same time is not nice and not really necessary. Next version was a "forsome" that took 2 extra numbers to specify the range of servers to address. And finally I scheduled it with "at" for each of the groups. Rob ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
