I need to execute a batch script which runs the shell script remotely inside the Linux box.
Now, everything is working fine, but the script fails to execute if I try to give a command line parameter to the shell script.
Working -> ex
C:\temp\Testing>putty.exe -pw "blabla" -m "test-script.sh" [email protected]
But if I try to give arguments it fails to execute. Example:
Not Working
C:\temp\Testing>putty.exe -pw "blabla" -m "test-script.sh ok-1" [email protected]
where ok-1 = command line argument for local script test-script.sh
How can I fix this problem?
-moption.-moption is to provide a command text file and that command text file is taken as is and executed on target server.-mas far as I know, is not designed to consider what follows as a command line syntax. Instead-mtells putty to grab the file mentioned after-mand execute it remotely. So, when you provide a command line argument, sayok-1, putty thinks ofok-1as a file.HTH. I can provide an alternate way to do what you are trying to achieve.