![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2006
Posts: 3
Rep Power: 0
![]() |
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.. |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Nov 2006
Posts: 3
Rep Power: 0
![]() |
fixed;
it turns out the FTP_TERMINATE in the function requires to be at the begining of the line (no \t before) Hope this helps anybody else! Cheers! Seb. |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4
![]() |
look up "here document" on google.
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Nov 2006
Posts: 3
Rep Power: 0
![]() |
Oh man!
The more I learn about linux bash programming/scripting... the more I love it! Cheers for your input mate! Seb. |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
No substantive post, but I want to commend you for reporting your self-discovered fix for the benefit of the rest of us.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Combining languages | titaniumdecoy | Other Programming Languages | 12 | Jul 13th, 2006 2:03 PM |
| Compiling Maverik 6.2 (from C) | megamind5005 | C | 16 | May 3rd, 2006 5:41 PM |
| libraries | matko | C | 1 | Jan 22nd, 2006 2:12 PM |
| Jackpot game | zorin | Visual Basic | 3 | Jun 10th, 2005 1:19 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |