Run a script in remote UNIX using windows command prompt

2013-07-23T22:01:57

I currently connect to my UNIX installed on my remote server using Secure CRT. I have a script(sh) on my UNIX which generates a file. I need to su(switch user) before executing the script.

I then ftp to this server(using ftp commands in command prompt on windows) and get the file generated by the above shell script.

However, I would like to automate this process and create a windows .bat file which would connect me to the UNIX server, su and run the required shell script and fetch the file.

I have found that I cannot run the shell script on UNIX using ftp. Could you please suggest me alternate ways to automate this?

Thanks

Copyright License:
Author:「vib」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/17812439/run-a-script-in-remote-unix-using-windows-command-prompt

About “Run a script in remote UNIX using windows command prompt” questions

I currently connect to my UNIX installed on my remote server using Secure CRT. I have a script(sh) on my UNIX which generates a file. I need to su(switch user) before executing the script. I then ...
When using UNIX I use to type !! to run the last executed command. How could I do the similar kind of operation on Windows command prompt?
I got a couple of questions, Is there any way to make a UNIX script run under a windows OS without any add-on like CYGWIN? Is there any way to transform a UNIX script to a windows batch script, s...
I have the client/TTU installed on Unix box for Teradata. If I do the following, it works. Where "..." is Teradata BTEQ normal output and once the following is done, I'm back at the prompt. $ bte...
I have to execute python script in windows command prompt I am using the following command to run the command, so that the script opens the command prompt execute it os.system("start /wait cmd /c...
I would like to clarify something, when I say open cmd, I mean literally/physically open the cmd on the windows server. For example, if I use RDP to connect to the server then I can see the cmd ope...
What needs to be done? I need to make a connection to the remote machine through UNIX, go to the shared drive, open an excel file, save it and close it. This needs to written in an script. The file
I am writing a Shell Script using Bash on Solaris to retrieve the Size of a remote file on a Windows Server. size=$(ssh $id@$ip <Windows Prompt command to get size of file at C:\Users\KMST\Docu...
I am working with the cmd prompt in Windows 7 (Win32). I have a txt file with a list of URLs of the files I would like to download. Similar to cURL HTTP transfer data, I am using the following comm...
I write my Perl code in Textpad (which I believe is only avai in Windows). I run it on Linux cmd prompt by calling the Perl interpreter explicitly, e.g. "perl script.pl". I was wondering if it's

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.