Operating System - HP-UX
1834165 Members
2034 Online
110064 Solutions
New Discussion

executing a function with remsh

 
SOLVED
Go to solution
Maciej Szewczykowski
Frequent Advisor

executing a function with remsh

hi all,
i have the following question: there is a script i wrote and within it there's a function defined. i'd like this function to be executed on remote host using 'remsh' command. is this possible? do i need to apply a special -option while doing 'remsh'? (the function mentioned is supposed to read folder names within a certain directory, then 'read' output is stored as variable).
thank you in advance.
1 REPLY 1
Massimo Bianchi
Honored Contributor
Solution

Re: executing a function with remsh

Hi,
it is not possible, because the remsh execute a command or a set of commands on the remote hosts.

If you want to execute that function, put the content in a file called function_xx.sh, remote copy the file with rcp, change executable permission on remote host (remsh chmod..) and finally execute it (remsh function_xx.sh).

HTH,
Massimo