EthicalEpi
07-11-2005, 08:06 AM
ftp -v -n $Host << FTPSCRIPT
user $Username $Password
cd somedir
delete somefile.txt
bye
FTPSCRIPT
echo "completed..."
the above is a simplified snippet from a shell script that I'm working on at the moment. It basically logs into an FTP account, changes directory, then deletes a file and exits. This works OK.
The problem I'm having is that it never gets to the echo "completed..." line and doesn't continue with the rest of the script.
Anyone have any ideas why that is? I've got a feeling this is something very simple that I'm missing to do with the redirection but haven't been able to find an explanation online. I'm pretty new to shell scripting.
user $Username $Password
cd somedir
delete somefile.txt
bye
FTPSCRIPT
echo "completed..."
the above is a simplified snippet from a shell script that I'm working on at the moment. It basically logs into an FTP account, changes directory, then deletes a file and exits. This works OK.
The problem I'm having is that it never gets to the echo "completed..." line and doesn't continue with the rest of the script.
Anyone have any ideas why that is? I've got a feeling this is something very simple that I'm missing to do with the redirection but haven't been able to find an explanation online. I'm pretty new to shell scripting.
