User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 456,552 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,472 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Legacy and Other Languages advertiser: Programming Forums
Views: 2301 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 2
Reputation: brdholman is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
brdholman brdholman is offline Offline
Newbie Poster

ftp inside function in korn shell script

  #1  
Oct 17th, 2007
This code works when it runs straight in the script, but when I put it in a function, I get an error:

 ftp -inv "$FTP_SERVER" << EOF_FTP
    user ${FTP_USER} ${FTP_PSWD}
    cd ${FTP_DIR1}
    cd ${FTP_dir2}
    bin
    mget ${FTP_FILE}
    quit
    EOF_FTP

the error says '<' is not matched. Do I need to change something just because I put it in a function?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 2
Reputation: brdholman is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
brdholman brdholman is offline Offline
Newbie Poster

Re: ftp inside function in korn shell script

  #2  
Oct 18th, 2007
I shouldn't have indented the last line.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Legacy and Other Languages Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Legacy and Other Languages Forum

All times are GMT -4. The time now is 5:18 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC