lapapaye / parallel-ssh

Automatically exported from code.google.com/p/parallel-ssh
Other
0 stars 0 forks source link

how to call a shell script from pssh command line ? #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am able to execute a shell command eg find command from pssh on multiple 
hosts ,however I wan t execute a shell script which contains some logic besides 
command, is there any way to do that ?

pssh -v -t 1000 -p 25 -h /mydir/host.lst -o /mydir/dir "sh +x 
/mydir/shellscript.sh" 

please help.

Original issue reported on code.google.com by negi.suj...@gmail.com on 4 Jan 2012 at 8:40

GoogleCodeExporter commented 8 years ago
Running scripts works great. If your script has the right permissions and the 
"#!/bin/sh" line at the top, then you should be able to give 
"/mydir/shellscript.sh" as the final argument. If not, then "sh 
/mydir/shellscript.sh" should work. I'm not familiar with the "+x" 
option--perhaps that is your problem. You may also consider saving the output 
from stderr using the "-e" or "-i" option to debug any errors in your script.

For further help, I would like to direct you to the pssh mailing list, as the 
issue tracker is intended for bugs in pssh. Let us know (on the mailing list) 
if you have any other questions. Thanks, and good luck with pssh.

Original comment by amcna...@gmail.com on 4 Jan 2012 at 9:59

GoogleCodeExporter commented 8 years ago
thanks for the help .It works... :)

Original comment by negi.suj...@gmail.com on 7 Jan 2012 at 1:33