The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help with shellscript jigarlakhani Shell Programming and Scripting 2 11-22-2007 04:28 AM
Shellscript for MQSeries ram2s2001 High Level Programming 0 12-11-2005 08:48 PM
Another shellscript question jigarlakhani Shell Programming and Scripting 18 11-30-2005 06:50 AM
ftp in Shellscript ggowrish UNIX for Advanced & Expert Users 3 06-11-2004 05:09 AM
Shellscript Interpreting Ann UNIX for Dummies Questions & Answers 3 01-19-2002 08:31 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-06-2007
Registered User
 

Join Date: Dec 2006
Location: hyderabad
Posts: 102
shellscript problem

hI,
Pls consider the following shell script

#!/bin/csh -f

sqlplus tkyte/tkyte <<"EOF" > tmp.csh
set serveroutput on
declare
a number:=5;
begin
dbms_output.put_line( 'a:='||a );
end;
/
spool off
"EOF"

The above script does the followin
1)it connects to oracle.
2)It reads the simple pl/sql programming till "EOF" and puts that code in a file called tmp.csh
But when i execute the above script ,The pl/sql code is not getting transfered into the specified file.
If any thing is wrong in the above script pls correct me.

cheers
RRK
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-06-2007
Registered User
 

Join Date: Mar 2007
Posts: 35
Try below code

#!/bin/csh -f

sqlplus tkyte/tkyte << "EOF"
set serveroutput on
declare
a number:=5;
begin
dbms_output.put_line( 'a:='||a );
end;
/
spool off
"EOF" >> tmp.csh 2>&1
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0