1#!/bin/bash-2#===============================================================================3 #4# File:ftp_put_file.SH5 # 6# USAGE:./ftp_put_file.SH 7 # 8 # DESCRIPTION:9 # Ten# OPTIONS:--- One# REQUIREMENTS:--- A# BUGS:--- -# NOTES:--- - # author:linkscue (scue), [email protected] the # ORGANIZATION: - # created:2014 August 03 01:14 25 sec CST -# REVISION:--- -#=============================================================================== + - # FTP upload file + # relies on the ncftp command A put_action () { atsrv=$1# FTP Server Addr -port=$2# FTP Server Port -user=$3# FTP Client User - passwd=$4# FTP Client Passwd - dir=$5# File storage directory - file=$6# files to be uploaded intmp=/tmp/$ (basename$0) _$$.txt - Cat<<-eof >$tmp toCD $dir +Put $file - Bye the EOF *Ncftp-u $user-P $passwd$srv $port <$tmp $ RM-F $tmpPanax Notoginseng } - thePut_action192.168.1.201 +Scue123/Dropbear.SH