DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Debbie Guest

    Piping Results to a file


    I have a shell script in UNIX that has a Oracle SQL command. What I would
    like to do is pipe the results of the query to a separate file. What is
    the command I use?

    Note, I ran the shell script from the command line and it pipes out to the
    file, but somehow it won't do it is I place the command into a shell script
    and initial the command.

    Can anyone help me out?

  2. #2
    Debbie Guest

    Re: Piping Results to a file


    I got my question answered for anyone who might be wondering how this is done.
    The command is: spool <filename>. It creates the file with a .lst extension.
    Once done, you must run: spool off.

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    "Debbie" <dremig@melloninvestor.com> wrote:
    >
    >I have a shell script in UNIX that has a Oracle SQL command. What I would
    >like to do is pipe the results of the query to a separate file. What is
    >the command I use?
    >
    >Note, I ran the shell script from the command line and it pipes out to the
    >file, but somehow it won't do it is I place the command into a shell script
    >and initial the command.
    >
    >Can anyone help me out?



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links