I am having this script:
EXEC=$(expect -c "
spawn sftp -o \"BatchMode no\" -b /home/portal/bin/xymon-backup-cmd $USER@$HOST
mv bb-hosts bb-hosts_`date -I`
xymon-backup-cmd has the following commands in it:
If I run it from the CL, it works and it saves the bb-hosts file to the "/var/www/html/xymon-backup" dir.
But if run by cron, it does not work.
Could you help me please?