crontab -e
1 17 * * * "/usr/bin/lftp -c "open $hostname && user $username $password && cd $current_dir && get -c $file_name"
#!/bin/ksh
sdir="/var/mqm/tmp/pso/"
filename="pso_whse_orders_inout"
hostname="n0aif01"
username="evaxd4"
password="march2012"
ftp -in $hostname <<EOF
user $username $password
binary
cd $sdir
get $filename /location/to/localfile
quit
EOF
mv -f $filename $filename.`date '+%Y%m%d'`