Home » Infrastructure » Unix » Please Help Me Convert this C Shell Script to Korn Shell
Please Help Me Convert this C Shell Script to Korn Shell [message #97864] Wed, 26 March 2003 11:17 Go to next message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
Hi,

I am interested in this Ask Tom discussion.

In it, the following C-shell script is referenced:
-------------------- bof ----------------------------
#!/bin/csh -f
 
sqlplus tkyte/tkyte <<"EOF" | grep '^#' | sed 's/^.//' > tmp.csh
 
set serveroutput on
 
declare
        status  number;
        command varchar2(255);
begin
        status := dbms_pipe.receive_message( 'HOST_PIPE' );
        if ( status <> 0 ) then
                dbms_output.put_line( '#exit' );
        else
                dbms_pipe.unpack_message( command );
                dbms_output.put_line( '##!/bin/csh -f' );
                dbms_output.put_line( '#' || command );
                dbms_output.put_line( '#exec host.csh' );
        end if;
end;
/
spool off
"EOF"
 
chmod +x tmp.csh
exec tmp.csh
----------------------- EOF ---------------------------------
Could a shell-script wonk please convert the above to Korn shell for me?

Many thanks,

Art
Re: Please Help Me Convert this C Shell Script to Korn Shell [message #97876 is a reply to message #97864] Thu, 03 April 2003 15:29 Go to previous messageGo to next message
Anand
Messages: 161
Registered: August 1999
Senior Member
This is my guess...

Convert the first line in the script which reads "#!/bin/csh -f" to "#!bin/ksh -f". This will run this script in the K-shell. Nothing else needs to be changed in the script. Specify the full-path for SQLPLUS ($ORACLE_HOME/bin/sqlplus)
Re: Please Help Me Convert this C Shell Script to Korn Shell [message #97885 is a reply to message #97864] Mon, 21 April 2003 15:37 Go to previous messageGo to next message
Anand
Messages: 161
Registered: August 1999
Senior Member
Hi Art,

A quick question ...

I sometimes see you pasting hyperlinks to reply specific problems. How do you create hyperlinks to some other page ? jus curious ..

Thanks
Re: Please Help Me Convert this C Shell Script to Korn Shell [message #97887 is a reply to message #97864] Wed, 23 April 2003 14:57 Go to previous message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
quote from Anand:
----------------------------------------------------------------------
Hi Art,

A quick question ...

I sometimes see you pasting hyperlinks to reply specific problems. How do you create hyperlinks to some other page ? jus curious ..

Thanks 

----------------------------------------------------------------------
Anand,

It's nothing more than HTML.

So I link to Yahoo! like this:

< a href ="http://www.yahoo.com" >Yahoo!< /a >

Without the spaces, of course.

Good luck,

A
Previous Topic: Oracle error messages
Next Topic: adding directory to my path
Goto Forum:
  


Current Time: Tue May 21 21:24:24 CDT 2024