Sponsored Content
Top Forums Shell Programming and Scripting Convert listner.log to csv format with comma seperated Post 303010583 by skoshekay on Wednesday 3rd of January 2018 04:43:45 PM
Old 01-03-2018
Thanks for the reply, however i am still not getting the correct results

this is my sample listner.log

Code:
12-DEC-2017 15:20:57 * (CONNECT_DATA=(SID=TEST)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=62965)) * establish * TEST * 0
12-DEC-2017 15:21:11 * (CONNECT_DATA=(CID=(PROGRAM=SQL DevelTEST)(HOST=__jdbc__)(USER=Naresh))(SID=TEST)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.33.9.20)(PORT=50314)) * establish * TEST * 0
12-DEC-2017 15:21:39 * (CONNECT_DATA=(SID=TEST)(CID=(PROGRAM=perl@test)(HOST=test)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63031)) * establish * TEST * 0
12-DEC-2017 15:21:51 * (CONNECT_DATA=(SID=TEST)(CID=(PROGRAM=perl@test)(HOST=test)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63049)) * establish * TEST * 0
12-DEC-2017 15:22:23 * (CONNECT_DATA=(CID=(PROGRAM=SQL DevelTEST)(HOST=__jdbc__)(USER=Naresh))(SID=TEST)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.33.9.20)(PORT=50323)) * establish * TEST * 0
12-DEC-2017 15:25:21 * (CONNECT_DATA=(SID=TEST)(CID=(PROGRAM=perl@test)(HOST=test)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63393)) * establish * TEST * 0
12-DEC-2017 15:25:50 * (CONNECT_DATA=(SID=TEST)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63440)) * establish * TEST * 0
12-DEC-2017 15:26:49 * (CONNECT_DATA=(SID=TEST)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63537)) * establish * TEST * 12518

which i wanted to convert this to a csv file with comma seperated.

Code:
DATE,SID,HOST,USER,ADDRESS

Thank you

---------- Post updated at 05:43 PM ---------- Previous update was at 05:31 PM ----------

this is the output i am getting

Code:
SID,HOST,PORT,USER
TEST,__jdbc__,50314,Naresh,DevelTEST)(HOST=__jdbc__)(USER=Naresh))(SID=TEST)),*,(ADDRESS=(PROTOCOL=tcp)(HOST=10.33.9.20)(PORT=50314)),*,establish,*,TEST,*,0
TEST,__jdbc__,50323,Naresh,DevelTEST)(HOST=__jdbc__)(USER=Naresh))(SID=TEST)),*,(ADDRESS=(PROTOCOL=tcp)(HOST=10.33.9.20)(PORT=50323)),*,establish,*,TEST,*,0
TEST,__jdbc__,62965,oracle,*,(ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=62965)),*,establish,*,TEST,*,0
TEST,__jdbc__,63440,oracle,*,(ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63440)),*,establish,*,TEST,*,0
TEST,__jdbc__,63537,oracle,*,(ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63537)),*,establish,*,TEST,*,12518
TEST,test,63031,oracle,*,(ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63031)),*,establish,*,TEST,*,0
TEST,test,63049,oracle,*,(ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63049)),*,establish,*,TEST,*,0
TEST,test,63393,oracle,*,(ADDRESS=(PROTOCOL=tcp)(HOST=000.00.000.00)(PORT=63393)),*,establish,*,TEST,*,0


Last edited by RudiC; 01-04-2018 at 06:10 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to load comma seperated values file (*.csv) into Oracle table

Hi all I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so... The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (5 Replies)
Discussion started by: handynas
5 Replies

2. UNIX for Advanced & Expert Users

How to load comma seperated values file (*.csv) into Oracle table

Hi all I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so... The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (4 Replies)
Discussion started by: handynas
4 Replies

3. Shell Programming and Scripting

Handling .CSV( Comma seperated value) in awk

Hi Guys, I am trying to reading in comma seperated values in awk. I can set the delimiter to be a comma, but the tricky part is that commas that appear within quotes are not to be considered as delimiters. Could someone please help. Regards, Laud (1 Reply)
Discussion started by: Laud12345
1 Replies

4. Shell Programming and Scripting

how to convert the result of the select query to comma seperated data - urgent pls

how to convert the result of the select query to comma seperated data and put in a .csv file using korn shell. Pls help me as its very urgent. Thanks, Hema. (1 Reply)
Discussion started by: Hemamalini
1 Replies

5. UNIX for Dummies Questions & Answers

converting a tabular format data to comma seperated data in KSH

Hi, Could anyone help me in changing a tabular format output to comma seperated file pls in K-sh. Its very urgent. E.g : username empid ------------------------ sri 123 to username,empid sri,123 Thanks, Hema:confused: (2 Replies)
Discussion started by: Hemamalini
2 Replies

6. Shell Programming and Scripting

Convert comma text file to Column in html format

I am trying to generate a report with below file : File1 : EQADM,edrtere9-phys,8122caef0,gpatmon,/bin/ksh,nuten Erick EQADM,edrtere11-phys,8227caef0,gpatmon,/bin/ksh,nuten Erick EQADM,edrtere3-phys,822caef0,gpatmon,/bin/ksh,nuten Erick can you help me convert it to html and add... (9 Replies)
Discussion started by: sriram003
9 Replies

7. Shell Programming and Scripting

Removing blank lines from comma seperated and space seperated file.

Hi, I want to remove empty/blank lines from comma seperated and space seperated files Thanks all for help (11 Replies)
Discussion started by: pinnacle
11 Replies

8. Shell Programming and Scripting

how to convert this file into comma delimited format

Hi experts, I need urget help! I have the a text file with this format: Types of fruits Name of fruits 1,1 Farm_no,1 apple,1 pineapple,1 grapes,1 orange,1 banana,1 2,2--->this is the record seperator Farm_no,2 apple,1 pineapple,1 grapes,3 orange,2 banana,1 3,3--->this is the... (1 Reply)
Discussion started by: natalie23
1 Replies

9. UNIX for Advanced & Expert Users

Urgent! need help! how to convert this file into comma delimited format

Hi experts, I need urget help! I have the a text file with this format: Types of fruits Name of fruits 1,1 Farm_no,1 apple,1 pineapple,1 grapes,1 orange,1 banana,1 2,2--->this is the record seperator Farm_no,2 apple,1 pineapple,1 grapes,3 orange,2 banana,1 3,3--->this is the... (2 Replies)
Discussion started by: natalie23
2 Replies

10. Shell Programming and Scripting

Convert comma seperated file to line seperated.

Hi, I have data like this. 1,2,3,4 Output required: 1 2 3 4 I am trying to use tr function but getting error. Help is appreciated. (6 Replies)
Discussion started by: pinnacle
6 Replies
py_xls2csv(1)						      General Commands Manual						     py_xls2csv(1)

NAME
py_xls2csv - convert an Excel xls file to a comma separated value csv file SYNOPSIS
py_xls2csv input-file DESCRIPTION
This manual page was written for the Debian distribution because the original program does not have a manual page. py_xls2csv takes an Excel xls file as an argument and converts it to a comma separated value csv file. Output is sent to stdout. Additional utility scripts can be found in the tools/ directory. OPTIONS
This program does not take any command line options. AUTHOR
pyexcelerator and py_xls2csv were written by Roman V. Kiseliov <roman@kiseliov.ru>. This manual page was written by Kevin Coyner <kcoyner@debian.org> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. SEE-ALSO pyexcelerator(1), py_xls2txt(1), py_xls2html(1) October 12, 2006 py_xls2csv(1)
All times are GMT -4. The time now is 08:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy