Visit Our UNIX and Linux User Community

Need to run the batch script from shell scripting

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to run the batch script from shell scripting
# 1  
Old 10-03-2013
Need to run the batch script from shell scripting

Hi All,

I am working on shell scripting.My script is completed but I have one task that is to trigger the batch script(with or without parameter) from my shell scripting(reside on linux system) and output which is geneareted by the batch should e.g. if batch script creates any files then I want to put that script back tomy linux system at any particular folder.

Thanks in Advance

Last edited by Don Cragun; 10-03-2013 at 08:57 PM.. Reason: Remove extraneous CODE tags
# 2  
Old 10-03-2013
Great you found the code tag.. please use it for code only, as otherwise the text that appears might be a little to long for common displays to be displayed properly on some systems in this univerese.. this is just to illustrate the behaviour...

Let me rephrase this first...
Some script should call another.
Something should be copied somewhere
With or without parameters...

Please provide more information.
What do you want to do/achieve.
# 3  
Old 10-04-2013
Hi Sir,

What am I trying to do is
for e.g I have shell scripting will run that shell script from linux box and there is batch script which reside on window server (esp.bat).My shell script will trigger the batch script on windows server and batch script will create a text file.I need to fetch that file from window server back to linux server.

# 4  
Old 10-04-2013
Just like you call the batchfile on the windows machine from linux ,
you can access the textfile it created.

This would copy the file outputfile.txt from the 'windowsmachine''s share 'share' to your $HOME...
cp //windowsmachine/share/outputfile.txt $HOME/

Hope this helps
# 5  
Old 10-04-2013
Windows/UNIX mounts don't work that way. // doesn't have special meaning to UNIX, and is condensed down to /. There'd have to be a real folder named /windowsmachine/ in your root folder for that to give anything but 'no such file or directory'.
# 6  
Old 10-05-2013
How are you invoking the batch file on your Windows system from a Linux system? SSH server on the Windows system? If you explain your setup to us, we may be able to help you.

Previous Thread | Next Thread
Test Your Knowledge in Computers #989
Difficulty: Medium
OpenBSD includes no third-party components.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Batch script to execute shell script in UNIX server

Hi team, My requirement is to transfer pdf files from windows machine to unix server and then from that unix server we should sftp to another server. I have completed the first part i.e From windows to using to unix server with the help of psftp.exe code: psftp user@host -pw password <... (1 Reply)
Discussion started by: bhupeshchavan
1 Replies

2. AIX

How to write a script to run without password on a batch of servers?

I need run a command such as ps -ef |grep xxx on a batch of servers, how to write a script to run it without password? don't need go in each server to check? Thanks (7 Replies)
Discussion started by: rainbow_bean
7 Replies

3. 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 ./ i need to run the in my remote server Above command is not working, any... (4 Replies)
Discussion started by: rammm
4 Replies

4. Shell Programming and Scripting

How to run multiple functions in Background in UNIX Shell Scripting?

Hi, I am using ksh , i have requirement to run 4 functions in background , 4 functions call are available in a case that case is also in function, i need to execute 1st function it should run in background and return to case and next i will call 2nd function it should run in background and... (8 Replies)
Discussion started by: karthikram
8 Replies

5. Shell Programming and Scripting

Batch script to run in SFTP

Hello Guys, I am writting a script which is SFTPing from Solaris to Windows. I need to run a Batch script in SFTP session (ongoing) which will map a network drive and then transfer my files. I can run the Batch script via SSH but not via SFTP and this mapping is limited to that SSH... (4 Replies)
Discussion started by: Deei
4 Replies

6. Shell Programming and Scripting

How to run a script using batch file?

the manual process which we follow is login to remote unix box thro putty using the unix account and password and then sudo to root user. server login as:pqrst password:****** $ sudo su - root then run the script stored on remote server under root account. ... (9 Replies)
Discussion started by: gpk_newbie
9 Replies

7. Shell Programming and Scripting

Dos batch script to execute unix shell script

Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh. Thanks in advance (2 Replies)
Discussion started by: Shri123
2 Replies

8. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

9. Shell Programming and Scripting

Change the Windows Batch script to UNIX shell script.

Hi, When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script... Script: REM :: File Name : Refresh_OTL.bat REM :: Parameters : %1 - Region REM :: : %2 - Cube Type REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies

10. Shell Programming and Scripting

How to write a Script to run series of batch jobs on unix platform

Im new to unix shell scripting, I have to run batch jobs on unix. for example i have 5 jobs. first 2 can kickoff parallely. after completely finishing the 2 previous jobs the 3 job should kick off..once 3rd is over 4 th and 5th can kick off parallely. Each jobs run for 1 or 2 hours each. How to... (2 Replies)
Discussion started by: venki311
2 Replies

Featured Tech Videos