Re: Problem in UNIX Script that includes SQL*Plus and IF/THEN/FI
Date: Thu, 13 Mar 2008 07:13:32 -0700 (PDT)
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: IF: not found.
> ./oracle_acct_locked.sh: THEN: not found.
> ./oracle_acct_locked.sh: FI: not found.
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