I am trying to run this script that I found, and am getting an error. I
normally use bash. I have tried 2 different ways to run it, and I get
errors on both. I would appreciate any advice:
--Using bash
: Command not found.
--Using C Shell
/home/oracle> host.csh
'nknown option: `-
Usage: csh [ -bcdefilmnqstvVxX ] [ argument ... ].
---------------------begin file
#!/bin/csh -f
sqlplus buck/password <<"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
---------------------end file