![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sco-Unix IP Printer no longer working | Netwrkengeer | SCO | 1 | 01-17-2008 12:28 PM |
| korn shell to bash - statement not working | brdholman | UNIX for Dummies Questions & Answers | 5 | 10-15-2007 06:49 AM |
| my account is no longer working | mhm4 | Forum Support Area for Unregistered Users & Account Problems | 9 | 04-11-2007 05:45 PM |
| putting a timestamp in a file | rocker40 | UNIX for Dummies Questions & Answers | 2 | 10-22-2003 08:56 AM |
| Putting pC on network | Rush | UNIX for Dummies Questions & Answers | 1 | 11-22-2002 12:33 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
putting ftp in korn function - no longer working
This works if it's not in a function. I pulled it into one and I get syntax error, no mathcing '<'. I have to call it several times and need it to be a function. Any ideas?
function FTP_Engine_File { ftp -inv ${FTP_SERVER} << EOF_FTP >> ${FTP_LOG} user ${FTP_USER} ${FTP_PSWD} cd ${FTP_DIR1} cd ${FTP_dir2} bin mget ${FTP_FILE} quit EOF_FTP mv engine.tar.Z $HOME/"$CURRENT_VERSION"/"$test_type/engine.tar.Z } |
| Forum Sponsor | ||
|
|
|
|||
|
It's all in the first column and now getting an unmatched '{'. I've been looking for an online resource with examples of functions without much luck. I'm new at this so sorry if this is an elementary issue.
function FTP_Engine_File { ftp -inv ${FTP_SERVER} << EOF_FTP >> ${FTP_LOG} user ${FTP_USER} ${FTP_PSWD} cd ${FTP_DIR1} cd ${FTP_dir2} bin mget ${FTP_FILE} quit EOF_FTP mv engine.tar.Z $HOME/"$CURRENT_VERSION"/"$test_type/engine.tar.Z } |
|
|||
|
1. Please post your code in [ CODE ] brackets, there is even a little button above to do this.
2. why people use this bash function construct is beyond me, why not use the portable Code:
my_function()
{
}
3. your quotes don't balance on the final "mv" |
|||
| Google UNIX.COM |