Visit Our UNIX and Linux User Community

Batch script to execute shell script in UNIX server

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Batch script to execute shell script in UNIX server
# 1  
Old 06-07-2014
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
psftp user@host -pw password < new.scr
content of new.scr
cd /app_logs/ifast/b2c
lcd D:\ifast\b2c
put Mayshifts.pdf

can somenone help in the further process.
i tried the below code in the new.scr but not working
cat << EOF | sftp user@host
cd /usrlog/rntaops/bhupesh
put Mayshifts.pdf


Last edited by bartus11; 06-07-2014 at 08:09 AM.. Reason: Please use [code][/code] tags.
# 2  
Old 06-07-2014
Welcome to the forums.
sftp requires authorized host. Can you connect to your remote server without password?
Also, check if ftp is allowed.

Previous Thread | Next Thread
Test Your Knowledge in Computers #281
Difficulty: Easy
A hypervisor or virtual machine monitor (VMM) is a computer software, firmware or hardware that creates and runs virtual private networks.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute a shell script in UNIX server from Cygwin

Hi All, We have shell scripts in UNIX ( Sun OS ) server. Also in my windows machine i have Cygwin installed. Now is there a way to execute Shell script available in UNIX server from Cygwin? (4 Replies)
Discussion started by: Girish19
4 Replies

2. Shell Programming and Scripting

How to execute a shell script that resides in another server?

hi, i have a shellscipt that is in another server, my question is how do i run the script from a different server. EXAMPLE: SCRIPT_NAME: SERVER: A what i wanted to achieve is to call that script from server B. Tried using ssh ssh <username>@serverB /home/ but... (5 Replies)
Discussion started by: reignangel2003
5 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

Shell script to copy a file from one server to anther server and execute the binary

Hi , Is there any script to copy a files (weblogic bianary + silent.xml ) from one server (linux) to another servers and then execute the copy file. We want to copy a file on multiple servers and run the installation. Thanks (1 Reply)
Discussion started by: Nawrajesh
1 Replies

5. 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

6. Shell Programming and Scripting

Execute unix shell script to text file using the script

Hi all, I am beginner in UNIX...I want to use unix shell script to create text.file...I know how to use using by command...can anybody tell me for the script? Thanks i changed the threads title from "tex file" to "text file", because "tex" would probably be misunderstood as reference to... (4 Replies)
Discussion started by: mastercar
4 Replies

7. Shell Programming and Scripting

how to execute shell script in another server that contain sql.

hi all, how to execute shell script in another server that contain sql script. i tried using "ssh -l" option.. but i am unable to load the environment variable of the remote host. please suggest how execute the shell script contain sql part inside it. (2 Replies)
Discussion started by: sandeep909
2 Replies

8. 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

9. Shell Programming and Scripting

How to execute multiple(batch) oracle script in unix mechine

Hi All, How to run multiple oracle script in unix at-a-time.I appriciate if any send the script for me. Regards, Ravi kumar.Gongati (2 Replies)
Discussion started by: ravi gongati
2 Replies

10. Shell Programming and Scripting

how to execute a batch script from shell script

Hi, I am new to shell scripting. Can anyone tell how to invoke a batch program from my shell script thnx (1 Reply)
Discussion started by: lakshmis10
1 Replies

Featured Tech Videos