parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Transferring a script file to EVERY host for "local" execution?


From: Shawn Skriver
Subject: Transferring a script file to EVERY host for "local" execution?
Date: Wed, 13 Oct 2010 13:25:33 -0500

I am interested in using "parallel" to ship a script file (i.e. Bash shell script) to ALL hosts in a given list and have EVERY host execute the script in a "local" context.

I can execute a Bash command on EVERY host like this ...
    cat /tmp/hostlist | parallel 'echo "#{}"; ssh root@{} hostname'
and capture & parse the STDOUT. The method, however, is sensitive to escape syntax and not convenient for complex scripting.

Is there a use pattern for parallel that would? ...
1) Transfer a given script file to EVERY remote host.
2) Instruct EVERY remote host to execute the script file.

In the above case the STDOUT content could be captured.

An extension of the above would return a uniquely named (e.g. using the host name as part of the file name) output file.

Thanks for any help you can provide!

-Shawn

reply via email to

[Prev in Thread] Current Thread [Next in Thread]