Re: Shell script to call FTP [off-topic]

From: Alex List <alex_at_octanti.com.br>
Date: Tue, 5 Apr 2011 16:25:43 -0300
Message-ID: <BANLkTi=i=Er+F-8=S81=J8MSTAfN0CzLVw_at_mail.gmail.com>



Thank you all!

It worked as it was suggested!
Perfect [?]

On Tue, Apr 5, 2011 at 15:10, Michael McMullen <ganstadba_at_hotmail.com>wrote:

> I do it this way.
>
>
>
> From my script
>
> ${KORNDIR}/do_ftp ${IAFIP} ${FTP_PASSWD} ${IAF_NAME}
>
>
>
> Then do_ftp is the following
>
> #!/bin/ksh
>
> FTP_PROG="ftp"
>
> FTP_ADDR="${1}"
>
> FTP_USER="oracle"
>
> FTP_PASSWD="${2}"
>
> ${FTP_PROG} -vin ${FTP_ADDR} <<EOF
>
> user ${FTP_USER} ${FTP_PASSWD}
>
> binary
>
> cd ${remotedir}
>
> lcd ${localdir}
>
> get ${3}
>
> bye
>
> EOF
> ------------------------------
>
> *From:* oracle-l-bounce_at_freelists.org [mailto:
> oracle-l-bounce_at_freelists.org] *On Behalf Of *Alex List
> *Sent:* Tuesday, April 05, 2011 1:41 PM
> *To:* Oracle I List
> *Subject:* Shell script to call FTP [off-topic]
>
>
>
> Hi,
>
>
>
> Sorry for posting an off-topic email, but I guess that my simple doubt is
> really simple to you guys.
>
>
>
> In my shell script to transfer files, I am having difficult to do the way I
> need.
>
> Basically when I invoke the shell, it supposed to log in on FTP server with
> password authenticated and so execute the ftp commands.
>
>
>
> ############
>
> ftp ftp://backup:bkp123_at_10.1.1.25 << _EOF_ >>/dev/null 2>&1
>
> bin
>
> prompt
>
> cd /srv43
>
> lcd /db/bugtracker/
>
> mput *.gz
>
> quit
>
> _EOF_
>
> ############
>
>
>
> However, when I try to execute I get error like: unknown host
>
>
>
> Do you have a suggestion what I am doing wrong??
>
> This same script needs to run on Linux64/bash and AIX.
>
>
>
> Thank you in advance for any clue.
>
> Alex
>



--
http://www.freelists.org/webpage/oracle-l


347.png
Received on Tue Apr 05 2011 - 14:25:43 CDT

Original text of this message