executing shell script in background on remote machine
Hi All,
i need to execute a script in background on remote machines(say 10 machines) in parallel and in return i need the pid of that process. i tried few commands like below in for loop
ssh hostname "sh abc.sh &; echo $!"
with this command prompt is hung on host machine itself then i try
ssh hostname "sh abc.sh &; echo $!" &
but no luck ssh is going in back ground
any help will be highly appreciated.
NOTE: to some of u it look like homework but i search internet but not able to find proper answer.
|