Re: Problem in UNIX Script that includes SQL*Plus and IF/THEN/FI

From: gazzag <gareth_at_jamms.org>
Date: Thu, 13 Mar 2008 07:13:32 -0700 (PDT)
Message-ID: <8009f29a-a987-42af-bc37-2abe7e49c972@s8g2000prg.googlegroups.com>


On 13 Mar, 13:49, bfoga..._at_gaports.com wrote:
> I wrote a UNIX script that executes a SQL statement via SQL*Plus,
> writes output to a spool file, then checks the spool file for a length
> <> 0. If the length is > 0 then an email message is sent to me showing
> the contents of the spool file.
>
> The IF/THEN/FI that is to check the file length is not working. For it
> I get messages:
> ./oracle_acct_locked.sh[20]: IF:  not found.
> ./oracle_acct_locked.sh[21]: THEN:  not found.
> ./oracle_acct_locked.sh[23]: FI:  not found.
[snip]

It's your case. Unix commands are in lower case. IF/THEN/FI should be if/then/fi

HTH -g Received on Thu Mar 13 2008 - 09:13:32 CDT

Original text of this message