Linux FTP script
#!/bin/sh
##### Date Generate####
DD=`date '+%d'`
MM=`date '+%m'`
YY=`date '+%y'`
gen=`date '+%y%m%d'`
#echo $gen
#### Tester code ####
#F=`find '/' '-name' 'Filename_$gen.txt'`
#F=`find /home/sap -name Filename_$gen.txt`
#echo $F
#find / -name *$YY$MM$DD*.txt
#FF=`Filename_$gen.txt`
###### FTP ######
ftp -v -n host
user username password
bin
hash
prompt
mput Filename_$gen.txt
by
EOF
##### Date Generate####
DD=`date '+%d'`
MM=`date '+%m'`
YY=`date '+%y'`
gen=`date '+%y%m%d'`
#echo $gen
#### Tester code ####
#F=`find '/' '-name' 'Filename_$gen.txt'`
#F=`find /home/sap -name Filename_$gen.txt`
#echo $F
#find / -name *$YY$MM$DD*.txt
#FF=`Filename_$gen.txt`
###### FTP ######
ftp -v -n host
user username password
bin
hash
prompt
mput Filename_$gen.txt
by
EOF
ความคิดเห็น