Quote:
|
Originally Posted by user`
still no luck, i've tried #rm commands and it says
usage: ftp host-name [port]
Code:
#!/bin/bash
USER=test
PASSWORD=test12345
cd /home/test/logs
tar zcvf backup.tar.gz test.log*
rm test.log*
COMMANDS=$(cat << EOF
ftp -n 41.220.71.162
$USER
$PASSWORD
cd /home/test2/public_html/backup
prompt off
put backup.tar.gz
exit
EOF)
echo $COMMANDS > commands
ftp < commands
#rm commands
|
You are using the command FTP twice remove one of them