1753935 Members
9504 Online
108811 Solutions
New Discussion юеВ

FTP script help

 
SOLVED
Go to solution
DnD_1
Regular Advisor

FTP script help

I tried to run this script but something might be wrong, can you advise ?

#!/bin/sh
ftp -n HSBC1
user hsbc1 hsbc2
binary
cd /user/savings/date/
mget *20090101*
bye
!

when I run it, it only login to the server but did nothing...

is there anything i have to improve ?
2 REPLIES 2
Jannik
Honored Contributor
Solution

Re: FTP script help

#/usr/bin/ksh

ftp -inv HSBC1<< !EOF
user hsbc1 hsbc2
binary
cd /user/savibgs/date/
prompt
mget *20090101*
quit
!EOF

This is more like it :-) If haven't tested it.
Try google.com "ftp script ksh"
jaton
DnD_1
Regular Advisor

Re: FTP script help

great, work like a champ!