Sponsored Content
Top Forums Programming How to Format database output (DBMS_OUTPUT.PUT_LINE) in unix? Post 302508397 by saps19 on Monday 28th of March 2011 04:00:56 AM
Old 03-28-2011
Ok, I done it with Spool.Smilie Getting the desired output. Smilie
Code:
varDate='date +...'
export spool_file=file_dir/spool_file_${varDate}.txt
db connection started
spool $spool_file
-- your db code here
/
spool off
exit;

Thanks,
Saptarshi
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sqlplus and dbms_output.put_line in shell script

Hi, I have created a pl/sql block utilises dbms_output.put_line. This script works fine when I call from sqlplus ie sqlplus @./scriptname but when I embed it within my shell script I get no output to screen so I end up with an empty spool file. I know it's executing successfully when called from... (6 Replies)
Discussion started by: stuck1
6 Replies

2. Shell Programming and Scripting

How to format database output

I have an output from a database query on the unix standard output as under: abc dsagh dsflsfds dsfsdfsdfsd sdf sdfsd sdfsd sdfsdf sdfsdfs sdfsdf sdfsdf sdfsdf sdfsdf sdfsdf sdfsdff dsfsdf sdfdf sdf (8 Replies)
Discussion started by: abcabc1103
8 Replies

3. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

4. Shell Programming and Scripting

[Solved] How to display only output of DBMS_OUTPUT.PUT_LINE , rest should be neglected

Hi All, I Have written a script through that i am calling sql file Sqlfile.sql set time on set timing on set echo on set head off set scan on set feedback on set serveroutput on set linesize 1000 DECLARE v_acc_no NUMBER(10); v_product_no NUMBER(10); BEGIN... (3 Replies)
Discussion started by: sujit_kashyap
3 Replies

5. UNIX for Dummies Questions & Answers

UNIX command output format

how can I get the df -h command output into excel format or csv file. df -k | tr -s " " | sed 's/ /, /g' | sed '1 s/, / /g' | column -t df -h | column -t I have tried as above but the format is not right. I'm not able to load the format into a excel or a table. ... (2 Replies)
Discussion started by: anita81
2 Replies

6. Shell Programming and Scripting

UNIX command output in csv format

I'm just wondering is there any way to capture the output of a unix command in a csv format. df -h gives the result of filesystem,free space,Used space, use %,mounted on. Is there a way to capture the command output and format it as comma sparated or fixed length file. (3 Replies)
Discussion started by: anita81
3 Replies

7. Shell Programming and Scripting

UNIX shell script to format output report

i am new to unix shell scripting, could someone please help me. i was asked to develop a unix script and requirement of the script is as follows: 1. In source directory, if any new files are being dropped by external system then an email should be sent out with a message saying "files are... (3 Replies)
Discussion started by: crefi1545
3 Replies

8. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

9. Shell Programming and Scripting

UNIX command output format in email is not same as on the system

Hi I have script to collect file system usage statistics from few remote unix hosts and email . On the UNIX system the column spacing is fine but the email output is not aligned properly. Any tips to fix this ? (1 Reply)
Discussion started by: new2prog
1 Replies

10. Shell Programming and Scripting

DBMS_OUTPUT.PUT_LINE doesn't print values in shell script

Hello, I'm trying to print the value of my cursor in the dbms_output.put_line in shell script, but it only shows "PL/SQL procedure successfully completed." nothing else. I have set serveroutput on, Below is my script : Any advise would be really helpful. sqlplus -s $ORACLE_LOGON <<EOF >>... (2 Replies)
Discussion started by: mail.chiranjit
2 Replies
grokevt-parselog(1)													       grokevt-parselog(1)

NAME
grokevt-parselog - Parse a windows event log and generate human-readable output based on message resources stored in a database. SYNOPSIS
grokevt-parselog -?|--help .PP grokevt-parselog -l database-dir .PP grokevt-parselog -m database-dir log-type .PP grokevt-parselog [-v] [-H] [-h] [-U] [-u] database-dir log-type .SH DESCRIPTION grokevt-parselog reads a windows event log (.evt file) and combines that informa- tion with messages templates and other resources stored in a pre-generated database. This is then printed to stdout in a comma-separated values (CSV) format. The database must be created by grokevt-builddb(1). ARGUMENTS
database-dir This is the directory where the database is stored. Currently, the actual log files from the original system are also stored in this directory tree. log-type This is the windows name for the log. By default windows has the following logs: Application Security System But others may have been created by third party software. Use the -l option to print a list of all available log types. (The log names are case-sensitive.) OPTIONS
-? Prints a basic usage statement. --help Same as -?. -l Log list mode. Lists the logs available in the specified database. -m Meta information mode. Lists meta information stored in the header of the specified log file. Does not print any actual log records. (Format of output in this mode is still subject to change.) -v Verbose mode. Prints status messages to stderr, which can be helpful for debugging. -h Prints a header row at the top of the CSV output containing labels for each column. (This is the default behavior.) -H Disables the printing of a header row. This is useful when grokevt-parselog is used in a script. -u Enables the UTF-8 output of some strings. This can be dangerous on terminals that are not configured to support UTF-8. -U Disables the use of UTF-8 for output. Unicode strings are instead converted to UTF-8 first, and then any remaining non-ASCII char- acters are quoted. (This is the default behavior.) EXAMPLES
To list all available logs types stored in '~/example.grokevt': grokevt-parselog -l ~/example.grokevt To read the 'Application' log from the database stored in '~/example.grokevt' and print it to stdout: grokevt-parselog ~/example.grokevt Application To read the 'System' log from the database stored in '~/example.grokevt' and print it to stdout without a header, and with verbosity turned on: grokevt-parselog -v -H ~/example.grokevt System BUGS
Probably a few. This script has not been extensively tested with some guest platforms. The file event log file format is pretty well understood and implemented, but some diabolical wrapped, dirty, or fragmentary logs may not be correctly parsed. Unicode support is currently limited. Any suggestions on how to better handle unicode output would be appreciated. CREDITS
Originally written by Jamie French. Converted to Python and extended by Timothy D. Morgan. Andreas Schuster has contributed greatly to the understanding of the event log format. Copyright (C) 2005-2007 Timothy D. Morgan Copyright (C) 2004 Jamie French LICENSE
Please see the file "LICENSE" included with this software distribution. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details. SEE ALSO
grokevt(7) grokevt-addlog(1) grokevt-builddb(1) grokevt-dumpmsgs(1) grokevt-findlogs(1) grokevt-ripdll(1) File Conversion Utilities 20 March 2008 grokevt-parselog(1)
All times are GMT -4. The time now is 03:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy