[NTLUG:Discuss] C OK, sh OK, but it still doesn't seem to work

Greg Edwards greg at nas-inet.com
Sat Nov 30 09:53:05 CST 2002


Fred James wrote:
> 
> Here is the one relevant line from the sh script (the extra ;echo "" is 
> because it seemed to need an <CR>, and anyway I figured it couldn't hurt):
> 
> cat $Filename | mailx $RecipientList;echo ""
> 
> Now the facts:
> (1) Run mail_utl.sh from the command line, and it all works fine.
> (2) Let the PL/SQL call mail_utl.sh through the C function and it
>     (a) writes all the files correctly.
>     (b) doesn't send the mail.
> 
> Any clues would be appreciated.  This same general problem has been 
> plaguing me all along - whatever I write works fine until I backup and 
> start it all with the PL/SQL procedure - no error messages or codes, it
> just doesn't happen.
> 

Fred,

Actually your extra echo may be the key here.  Are you making the call 
to mail_util.sh from inside the stored procedure?  If so I'd suggest you 
look at the possibility of PL/SQL capturing the input stream from the 
children that it executes.  Where is the cat actually being sent?  Run 
just the cat and see if your output shows up on the CRT.

Have you tried the mailx using an input redirection (mailx 
$RecipientList < $Filename) to see if that makes any difference.

-- 
Greg Edwards
New Age Software, Inc.
http://www.nas-inet.com





More information about the Discuss mailing list