1

Execute the method of a script to a remote server

view story
linux-howto

http://stackoverflow.com – I have a script with 4-5 methods in it, the script will be running on server1. I want couple of the methods of this script to run on server2. What I tried is.... script method1() { df -h } method2() { cd /path ls -al } cmd=ssh cmd_options="-v root@dtr6-sam-cache02" $cmd $cmd_options "method1; method2" method3() { --- --- } method4(){ } ----- ----- This is the error which I am getting ksh[1]: method1: not found [No such file or directory] ksh[1]: method2: not found [No such file or directory] It is not reading them as method so what should I do to make it read the method. I want t (HowTos)