Run shell script from .bat file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Run shell script from .bat file
# 1  
Old 12-15-2007
Question Run shell script from .bat file

hi

how can I execute a shell script on unix server from a .bat file of windows desktop??

Regards.
# 2  
Old 12-15-2007
1. Install putty.

2. setup public/private keys using puttygen.exe

3. use plink.exe to provide ssh client to invoke script on server
# 3  
Old 12-15-2007
Cygwin allows it too.

This is an example that I use to open a window and ssh into an interactive shell on a Linux PC:
Code:
SET h=naim
SET fg=green
%RUN% xterm -fg %fg% -bg black -fn 9x15 -geometry 100x30 -ls -sb -rightbar -sl 1000 -title %h% -e ssh "%id%@%h%" &

(Cygwin is a freeware UNIX-like environment that runs under Windows.)
# 4  
Old 06-20-2008
Bug run unix script via windows batch file

Dear Gurus,

I have a small query.. I want to call unix script via windows batch file.

My criteria.

i.e 1. I have windows server.. But windows server have oracle client only not oracle server.

2. I have a procedure for caluclation. i.e under oracle server(in Unix not windows).

3. I want to call that procedure via unix script and pickup the value(calculatd value) and redirect to batch file on windows using unix script.

a.bat is windows batch file
b.txt have some data file located in windows server
process_txtfile is procedure(in oracle under unix server)
unix script/oracle script should call the procedure and cacluate and append the line in b.txt file...

Please advice... any other alternatives also.


U r's new friend.

regards
Ram
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Run shell script based on date file

Hi Team, I have a to run a script based on a date present in a different file which updates everyday. Kindly help with the solution. My current execution : ksh scriptname.sh 10152019. But here i want to enter this date from a file which gets updated daily. My appraoch : date file location:... (3 Replies)
Discussion started by: midhun3108
3 Replies

2. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

3. Shell Programming and Scripting

How to run executeable file using shell script?

Hi all, i really need a help for run my executeable program and add a file as a paramater to the executeable program. i want to run my executeable program by shell script. i have space.exe program and want to run it with gr1.adl file as a parameter to that space.exe program. Is there... (8 Replies)
Discussion started by: weslyarfan
8 Replies

4. Shell Programming and Scripting

To run a shell script in remote server from windows batch file

Hi all, i need to run a shell script on remote server. I have created file .bat file in windows server with following code, c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh i need to run the script.sh in my remote server Above command is not working, any... (4 Replies)
Discussion started by: rammm
4 Replies

5. Shell Programming and Scripting

php file unable to run shell script with arguments

echo $result=exec("./permit.sh".$_FILES); pls suggest some other method to run shell script in php .:wall::mad: (0 Replies)
Discussion started by: upvan111
0 Replies

6. Shell Programming and Scripting

Shell script to run a python program on multiple entries in a file

Hello I am trying to run a python program using shell script, which takes a single argument from a file. This file has one entry per line : 1aaa 2bbb 3ccc 4ddd 5eee ... ... ... My shell script runs the program, only for the last entry : #!/bin/sh IFS=$'\n' for line in $(cat... (2 Replies)
Discussion started by: ad23
2 Replies

7. Shell Programming and Scripting

Run cygwin in .bat file

Hello everyone, I've written quite a few AWK scripts to run in cygwin and now, I would like to run them one after the other in a .bat file. The problem is, I tried modifying the .bat file used to run cygwin in the first place, but whenever I change something, it doesn't work. The PATH is set up... (3 Replies)
Discussion started by: Teroc
3 Replies

8. Shell Programming and Scripting

Help with shell script to run the commands reading options from local file

I have to use shell script to run series of commands on another unix box by connecting through SSH and giving user credentials. For running commands on remote machine I have to use options reading from a local file. Process: Connecting to remote unix server <host1.ibm.com> through ssh Login: ... (2 Replies)
Discussion started by: itsprout
2 Replies

9. Windows & DOS: Issues & Discussions

Calling a .bat file using Korn script

Hi all, I am a very new user for korn scripting and in a process of learning. i have a .bat file that calls a .vbs file which calls a macro used to convert an excel spread sheet to .csv file... Now i want to automate this process. I want to call this bat file using a korn script or a korn... (6 Replies)
Discussion started by: bhagya2340
6 Replies

10. UNIX for Advanced & Expert Users

help needed to connect to windows from unix and run .bat file

Hi Can anyone tell if it is possible to connect from Unix to t a remote windows environment and run a .bat script. Do SSH/SFTP... serve my purpose..if s how.... if not which commands or scripts will help with my requiremnt. points on this are greatly honoured. Thanks in advance. :) (1 Reply)
Discussion started by: lakshmis10
1 Replies
Login or Register to Ask a Question