![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "<< Unmatched" in ksh script using sftp | michaelak28 | Shell Programming and Scripting | 6 | 08-28-2008 05:49 AM |
| Getting error "syntax error at line 78 : `<' unmatched" | sshah1001 | Shell Programming and Scripting | 1 | 05-08-2008 02:41 PM |
| list of unmatched columns | mohan705 | Shell Programming and Scripting | 3 | 12-12-2007 06:37 AM |
| else unmatched | b.hamilton | Shell Programming and Scripting | 7 | 10-10-2007 02:03 AM |
| Delete unmatched data | nazri76 | Shell Programming and Scripting | 5 | 07-16-2006 03:41 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Try this,
if [ conditions ] <b>;</b> then commands...... fi |
| Forum Sponsor | ||
|
|
|
||||
|
A couple of things...
First, remove the ";" after the "fi" also, if $all_recs is from the command line, I assume you are assigning it... export all_recs=$1 Second, try changing: sqlplus -s $connect_string > /dev/null << EOF to: sqlplus -s $connect_string << EOF > /dev/null ...the second part should not have anything to do with the "unmatched then" but it may cause you execution problems. Additionally, the "if" command is a shell built-in and would be documented in the KSH(1) man page (assuming you are using ksh (just man the shell you use). |
|
|||
|
Thank you all for taking the time to help me with this.
I am using ksh. Everthing inside the if statement worked before I tried to enclose it in the if statement. I did assign the variable and tested it with an echo. Also, I have tested it a few times without the ';' after the fi and still it wont work. The line listed in the syntax error corresponds to the 'then' line number in the snippets above. The only ;'s remaining (besides the one at the end of the if line) are the ones inside the sqlplus routine. |
|
||||
|
Double quotes
Then there must be double quotes missing for your here doc:
Try: << "EOF and EOF" I am not 100% sure about the exact placement of the first double quote though...
__________________
Patrick Van der Veken - UNIX consultant (c) 2001 - 2001 http://www.baanboard.com - http://www.ux-core.com 'True strength lies in gentleness' - Irish proverb |