Re: executing shell scripts from PL/SQL

From: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: 1996/02/04
Message-ID: <yxl8RBApbSFxEwQP_at_jimsmith.demon.co.uk>#1/1


In article <311431e5.36431218_at_news.microfone.net>, Gee Wong <gwong_at_microfone.net> writes
>As soon as I get my Oracle7 system up, I am goint to try to execute a
>UNIX program/shell from PL/SQL using the following technique which has
>worked for me in similar situations with other languages.
>
>Using the package UTL_FILE, I plan to test the following procedure for
>executing a UNIX program/shell:
>
> PROCEDURE shell (sys_cmd IN VARCHAR2)
> IS
> DECLARE
> sys_file UTL_FILE.FILE_TYPE;
> BEGIN
> sys_file := UTL_FILE.FOPEN (' | \bin\', 'sh', 'W');
> UTL_FILE.PUT(sys_file, sys_cmd);
> UTL_FILE.NEWLINE(sys_file);
> UTL_FILE.FCLOSE(sys_file);
> END;
>
>I will not be able to test this out for another two weeks. You are
>welcome to try it out.
>
>Not bad for someone who just started learning PL/SQL two hours ago.
>Huh?

So how are you going to execute it, smartarse?

-- 
Jim Smith
Received on Sun Feb 04 1996 - 00:00:00 CET

Original text of this message