#!/bin/bash 
updir=.
todir=/public_html/tool/netencrypt
sss=`find $updir -type d -printf $todir/'%P\n'| awk '{if ($0 == "")next;print "mkdir " $0}'` 
aaa=`find $updir -type f -printf 'put %p %P \n'` 
ftp -nv imbugs.com <<EOF 
user [username] [password]
type binary 
prompt 
$sss 
cd $todir 
$aaa 
quit 
EOF 
