05-04-2010
Are you using a spool file for the sqlplus output? You can create the file in the script using the append operator (>>) and use the same filename in your sqlplus statements (SPOOL file APPEND) to save your sql output in the same file. Execute the SPOOL OFF command and then you can append more information to the file in your script again with the append operators (>>). It works well, allowing you to append the hostname and date and time stamps as a header in the file.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
how can I write a small script to run the following statement and output the result into check_result.txt
select /*+RULE*/ tapname from typetbl where tapname like 'AA%' and rejectcode=9;
Normally, I just type sql and get into SQL> (2 Replies)
Discussion started by: happyv
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a file containing the following data:
junk123junk723itemcode001qty01price10total10junkjunk
junk123junk723itemcode002qty02price10total20junkjunk
..
..
..
could be 5000+ lines
I have an algo and need a code to implement this:
1. Linecount = wc -l (should give 5000)
2. For i... (1 Reply)
Discussion started by: shiroh_1982
1 Replies
3. UNIX for Dummies Questions & Answers
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies
4. Shell Programming and Scripting
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies
5. Shell Programming and Scripting
Hi All,
I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file.
Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement to store oracle sqlplus output to some unix variable, count the records and then print the output on the screen.
Can you please point me to any sample program for reference purpose.
Thanks a lot for your time. (0 Replies)
Discussion started by: bhupinder08
0 Replies
7. Shell Programming and Scripting
Hi,
I never did this before... what I want to do is execute a SQL query from a unix script and redirect sql query's output to a flat file (comma separated one) without the header info (no column names). I would also want not to print the query's output to the screen.
snapshot of my script:... (13 Replies)
Discussion started by: juzz4fun
13 Replies
8. Shell Programming and Scripting
Hi ,
I have a sql query in the unix script ,whose output is shown below.I want to convert this output to HTML table format & send email from unix with this table as email body.
p_id src_system amount
1 A 100
2 B 200
3 C ... (3 Replies)
Discussion started by: jagadeeshn04
3 Replies
9. Shell Programming and Scripting
I have a sql statement , i need to assign to a variable in Unix
sel count(*) AS num_files from TABLE_A;
i need to use "num_files" in unix statements. let me know how to assign unix variable to above num_files (1 Reply)
Discussion started by: nani1984
1 Replies
10. UNIX for Beginners Questions & Answers
I am writing a shell script with 2 run time arguments. During the execution if i got any error, then it needs to redirected to a error file and in console. Also both error and output to be redirected to a log file. But i am facing the below error.
#! /bin/sh
errExit ()
{
errMsg=`cat... (1 Reply)
Discussion started by: sarathy_a35
1 Replies
LEARN ABOUT DEBIAN
rainbow-run
RAINBOW-RUN(8) System Administration Utilities RAINBOW-RUN(8)
NAME
rainbow-run - Create and use Rainbow-isolated instances
SYNOPSIS
rainbow-run [options]
OPTIONS
--version
show program's version number and exit
-h, --help
show this help message and exit
-v, --verbose
Verbosity. Repeat for more verbose output.
-q, --quiet
Quiet. Disable all output.
-s SPOOL, --spool=SPOOL
Location of the rainbow spool.
-e ENVDIR, --envdir=ENVDIR
Location of an envdir describing the desired environment.
-E ENV, --env=ENV
Environment bindings to override.
-c CWD, --cwd=CWD
Working directory.
-f FD, --fd=FD
File descriptor number to leave open.
-i ID, --id=ID
ID of shared-data group.
-o OPTION, --option=OPTION
Options: video, audio, serial, constant-uid, xephyr, network.
-p PERMISSIONS, --permissions=PERMISSIONS
Location of a permissions.info file.
-u USER, --user=USER
Owning user.
-r RESUME_USER, --resume-user=RESUME_USER
Resume <user>.
-a ASSISTANT, --assistant=ASSISTANT
Task-specific assistant.
-G GROUP, --group=GROUP
Extra groups.
AUTHORS
Rainbow was primarilly written by Michael Stone and Noah Kantrowitz.
SEE ALSO
Full documentation for the rainbow suite is stored at http://wiki.laptop.org/go/Rainbow
Rainbow User Manual December 2009 RAINBOW-RUN(8)