![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "<< Unmatched" in ksh script using sftp | michaelak28 | Shell Programming and Scripting | 6 | 08-28-2008 09:49 AM |
| Getting error "syntax error at line 78 : `<' unmatched" | sshah1001 | Shell Programming and Scripting | 1 | 05-08-2008 06:41 PM |
| list of unmatched columns | mohan705 | Shell Programming and Scripting | 3 | 12-12-2007 10:37 AM |
| Delete unmatched data | nazri76 | Shell Programming and Scripting | 5 | 07-16-2006 07:41 AM |
| Unmatched 'then' | akpopa | UNIX for Dummies Questions & Answers | 22 | 09-05-2001 10:29 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
else unmatched
I'm getting an else unmatched error on the script below..
For info : SYDB is the database name entered as a param on the command line. #Check the DB name HBDB=`sql $SYDB <<_END_ | grep '^|' | grep -v dbase | sed 's/|//g' | sed 's/ //g' set autocommit on; \p\g set lockmode session where readlock = nolock; \p\g select squeeze(trim(dbase)) as dbase from syapplic where applic_id = 'hb'; \p\g _END_` if [ -z "$HBDB" ] then echo "The HB Database name given is not a valid database!" exit 1 else echo "The Hb database name is $HBDB " echo " " fi # Declare variables for output MAINFOLDER=/*server location*/sig10 FILEDATE=`date +%Y%m%d` FILETIME=`date +%H:%M:%S` OUTPUTFILE="$MAINFOLDER/Sig_Birthdays_10_$FILEDATE.csv" #check that the comparison tale exists withing the HBDB TBL_CHECK=`sql $HBDB <<_END_ | grep '^|' | grep -v table_name | sed 's/|//g' | sed 's/ //g' set autocommit on; \p\g set lockmode session where readlock = nolock; \p\g select table_name from iitables where table_name = 'bh_sig_10'; \p\g _END_` echo $TBL_CHECK if [ "$TBL_CHECK" = "bh_sig_10" ] then echo "Comparison table exists" else echo "Comparison table does not exist - Script will create table" sql $HBDB <<_END_ > $MAINFOLDER/Create_comparison_table.txt set autocommit on; \p\g set lockmode session where readlock = nolock; \p\g create table bh_sig_10 ( claim_id i4, title varchar 4, forename varchar 32, surname varchar 32, birth_date date ) with nojournaling, noduplicates; \p\g _END_ fi ... I get the else unmatched on that else in bold....any clues? |
| Bookmarks |
| Tags |
| awk, awk trim, trim, trim awk |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|