0

Hi all

can anyone please help me write a shell script for file transfer from windows to unix server and vice versa. i m new to unix shell scripting so kindly bare with the small mistakes tht i mite have made

the code is:

#!/bin/sh

filename="sample.txt"
user='user'
password='passwd'
IP='some ip'

ftp -n -i -v $IP 22 <<-END_SCRIPT > LOG_file
user $user $password
status
bin
get $filename
bye
END_SCRIPT

thanks in advance

Edited by Nick Evan: Added code-tags

2
Contributors
2
Replies
5
Views
7 Years
Discussion Span
Last Post by jananis
0

So does it work?

What do you see in LOG_File?

Have you looked at the -d option of the FTP command?

Are there any diagnostics in your firewall (about trying to use a particular port)?

0

So does it work?

What do you see in LOG_File?

Have you looked at the -d option of the FTP command?

Are there any diagnostics in your firewall (about trying to use a particular port)?

i dont see anything in the log file, its 0 byte. i guess i m missing set up issues. may be in windows i need to enable FTP through IIS. could you please tell me those? what are the steps needed in windows side and unix side to transfer files between them. thank u

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.