| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Need batch FTP for Unix
Here is a ksh snippet.  The login/pass for ${FTPBNK} is held in .netrc.
do_ftp()
{
echo "\n++ FTP ${FILEIN} from ${FTPBNK}"
   ftp -v ${FTPBNK} > ${FTPLOG} <<-[]
   get ${FILEIN} ${FILEWRK}
   quit
[]
FTPGOOD="`grep -i 'transfer complete' ${FTPLOG}`" ; export FTPGOOD
if [[ -s ${FILEWRK} && -n ${FTPGOOD} ]]
then
      echo "\n++ FTP ${FILEIN} from ${FTPBNK} successful"
      echo "\n++ Deleting ${FILEIN} from ${FTPBNK}"
      ftp ${FTPBNK} <<-[]
      del ${FILEIN}
      quit
else
      echo "\n++ ${FILEIN} not found for update"
      echo "\nEXIT `basename ${0}`: `date`"
      log stop
      exit 1
"Smith, Ron L." wrote:
> 
> Can anyone send me a sample of a batch FTP script for HP Unix?
> --
> Author: Smith, Ron L.
>   INET: rlsmith_at_kmg.com
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
Received on Mon Jun 19 2000 - 17:12:55 CDT
|  |  |