View Single Post
Old Nov 15th, 2006, 8:49 PM   #1
Ryders
Newbie
 
Join Date: Nov 2006
Posts: 3
Rep Power: 0 Ryders is on a distinguished road
bash ftp in function....

this works fine;

        ftp -n $FTP_HOST <<FTP_TERMINATE
        quote USER $FTP_USER
        quote PASS $FTP_PASS
        bye
        FTP_TERMINATE
        exit 0;

whereas this doesn't

checkFtp() {

        ftp -n $FTP_HOST <<FTP_TERMINATE
        quote USER $FTP_USER
        quote PASS $FTP_PASS
        bye
        FTP_TERMINATE
        exit 0;

}

checkFtp;

It's about the << in the ftp connection... but hell I need them! how do I escape them?

anybody has a clue?!

Cheers,

Seb.

Last edited by Ryders; Nov 15th, 2006 at 8:50 PM. Reason: typos..
Ryders is offline   Reply With Quote