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

From: gazzag <>
Date: Thu, 13 Mar 2008 07:13:32 -0700 (PDT)
Message-ID: <>

On 13 Mar, 13:49, 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:
> ./[20]: IF:  not found.
> ./[21]: THEN:  not found.
> ./[23]: 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

Original text of this message