thanks for putting down your script here - it was a very helpful starting point for me. But I do have a problem: it seems as if the first script is not waiting for the 2nd script to finish but kills it before it's ready. I start up the script for testing purposes manually and tars the files but can't get to the point where they are actually uploaded - while the 2nd script is trying to change the directory I back at the prompt. Any idea what this can be about? Here's the output from my terminal
[root@mrbrown __B]# ./fmserver_backup_to_ftp.sh
tar: Removing leading `/' from member names
spawn ftp 217.20.xx.xx
Connected to 217.20.xx.xx (217.20.xx.xx).
220 ProFTPD 1.2.8 Server (Debian)
Name (217.20.xx.xx:root): bihh
331 Password required for bihh.
230 Anonymous access granted, restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd bac[root@mrbrown __B]#
So the script tried to issue "cd backup" but it didn't get that far ... and "timeout -1" should prevent that, shouldn't it?!
Any ideas would be appreciated!