LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-14-2009, 05:46 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
sql output generates on a os text file !


Dear Friends ,

In unix platform I want to create a script which helps to keep the sql command output in a os text file . Hence , I have to try in the following way :

vi aud.sh
Date=`date +%d%b%Y`.`date +%I`.`date +%M%p`
sqlplus /nolog
conn audita/audita@onlinete << !
spool file.$Date.txt
select * from scott.dept;
exit;

Output :
---------

bash-3.00$ sh aud.sh

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 14 17:40:31 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL>
--------

Now the problem is , it makes just connected with oracle but next two lines are not executed . If it is executed then output stores on "file.$Date.txt" file .

Now can anybody plz help me how can I execute last three(3) lines of my script ?

waiting for ur kind reply ... ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to parse text file to a set text column width and output to new text file? jsstevenson Programming 12 04-23-2008 02:36 PM
in Pascal: how to exec a program, discard text output or send to text file Valkyrie_of_valhalla Programming 6 05-02-2007 09:50 AM
command output to text file? meniscus Linux - Newbie 4 10-05-2006 05:29 AM
MPlayer only generates png, no x output delling81 Linux - Software 1 10-03-2003 01:53 PM
Piping output to a text file joadoor Linux - Newbie 7 04-19-2002 03:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration