{ 7 comments… read them below or add one }

1 Anonymous 12.28.05 at 7:15 pm
2 Michael 12.28.05 at 8:31 pm

If you want to fully parallelize the script you can wrap the ssh command in parentheses in order to execute in a subshell, I believe. That way the script doesn’t wait for the program to finish. I use this to dynamically test all the workstations in my lab (~150) to see which ones are up and running, so I can generate a machine list for a distributed MPICH program.

3 Anonymous 12.28.05 at 8:55 pm

Very nice script. I use(d?) to manually write a “for” loop every time I need to run the same command on multiple hosts.
I’ve just modified your sample script, declaring another variable (COMMAND=$@) to use instead of “w”, so I can run
./dsh cat /etc/hosts to get the content of all servers’ /etc/hosts in my mailbox.

4 WikiGeeiki 12.23.06 at 11:29 pm

Excellent article! Thank you.

5 nfo 09.10.08 at 8:14 am

Hi, nice script, simple and functionally!
another simialar solution is http://freshmeat.net/projects/dsh/
dsh can start a command parallel and serial, witch is a small advantage, but never mind.

best regards
andreas

6 Albert 12.30.08 at 7:47 pm

Great script, easy to use and understand. Thanks.

7 Boby Thomas 03.24.09 at 10:49 am

Nice script….thanks

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , , , , , , , , ,

Previous post: Traceroute to Bypass the Firewall filters and Personal Firewalls policy for home user

Next post: Shell scripting and brace expansion