NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Why this ftp script can not work properly?
Hi, It's me again~
I come to a problem that confuses me much:
I have written a ftp shell script to make my work easier, as follow:
---------------------------------------------------------
echo "-----FTP upload transmmision------"
echo -n "\n Please tell me ftp host address:"
read host
echo -n "\n Please input user name:"
read username
echo -n " Passwd required:"
stty -echo
read userpwd
stty echo
echo "\n If you are sure, HIT enter or press Ctl+C"
read goenter
for file in `ls`
do
echo "File $file transmmision in progress......"
sh ftp_auto.sh $host 21 $username $userpwd $file $file
echo "OK"
done
echo "\nMission complete!!\n"
---------------------------------------------------------------
and my ftp_auto.sh is as follow:
---------------------------------------------------------------
#!/bin/sh
ftp -niv $1 $2<<FTPIT
quote USER $3
quote PASS $4
put $5 $6
bye
FTPIT
---------------------------------------------------------------
The strange thing is: the file with big size can not be uploaded completely!
but shell script output says that every file transfer is 100%!
I am sure that the file ftp server got is a little bit less than the original
one, and if I use ftp command directly to upload the file, every thing is OK!
Is anyone familiar with this situation?
Home |
Main Index |
Thread Index |
Old Index