On Wed, 28 Aug 2002, juaid wrote:

> I believe it's not possible with ftp, but with ncftp

wrong ... sanitized example from live production follows:

-- Russ Herrold

#!/bin/sh
############################################################
#
#       The HOME variable is needed by ftp to find .netrc
#       when placed in a cron situation
#
#       [EMAIL PROTECTED]
#
############################################################
export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export HOME=/root
#
/usr/bin/ftp  < /root/ftp.scr
#
exit 0
#
############################################################
#
#       $RHOST is the remote host name
#       We rely on ~/.netrc having the userid and pssword, per 
#       the man pages
#
cat - << END > /root/ftp.scr
open $RHOST
type ascii
get 'PCS.GPNAT.RPT30'   PCS.GPNAT.RPT30
quit
END
#
#
cat - << END > /root/.netrc
machine $RHOST
        login $USERID
        password $PASSW
default
        login anonymous
        password [EMAIL PROTECTED]
END
chmod 400 /root/.netrc
#




-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to