HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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!