12-09-2008
convert files into csv format using perl
Hi all perl gurus,
I need your help to get the desired output in perl.
I have a file which has text in it in the format
Connection request start timestamp = 12/08/2008 00:58:36.956700
Connect request completion timestamp = 12/08/2008 00:58:36.959729
Application idle time = 1 minute 8 seconds
CONNECT Authorization ID = PDPD240
Client login ID = pdpd240
Configuration NNAME of client = sppwd518
but i want it to be displayed in the format.
12/08/2008 00:58:36.956700,12/08/2008 00:58:36.959729,1 minute 8 seconds
i.e. the left most things to be in a comma seperated value.
The script should take the file name as argument.for eg
perl scriptname <filename>
even a snippett of the code would be fine for me to atleast have an idea how to go ahead
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file coming in xxx.txt(csv format) i do some work on it and i need to send out as a .xls format. Is there any way there is some code i can use in my script to convert this?
I'm struggling on this.
Thanks (11 Replies)
Discussion started by: Pablo_beezo
11 Replies
2. Shell Programming and Scripting
I have a file with the data as follows..
FILE 1|#START|Jan 22 15:03
FILE 1|#END|Jan 22 16:06
FILE 2|#START|Jan 22 5:15
FILE 2|#END|Jan 22 5:25
FILE 3|#START|Jan 22 07:03
FILE 3|#END|Jan 22 08:15
FILE 4|#START|Jan 22 16:09
FILE 4|#END|Jan 22 16:55
FILE 1|#START|Jan 22 18:15
FILE... (5 Replies)
Discussion started by: karthikd214
5 Replies
3. Shell Programming and Scripting
Can any one give the idea on this, please.
I have the following XML file and wants to convert into CSV(comma separated value) format.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
<Waveset>
<Object name='ra8736'>
<Attribute name='ADDRESS'... (2 Replies)
Discussion started by: kumar04
2 Replies
4. Shell Programming and Scripting
Dear guys;
I have a binary file and I need to convert its data to csv format ...appreciating your help.
Best Regards (14 Replies)
Discussion started by: ahmad.diab
14 Replies
5. Shell Programming and Scripting
Hi ,
i want to change this question, i will post soon.. (6 Replies)
Discussion started by: srikanth2567
6 Replies
6. Programming
hi...... thanks for allowing me to start a discussion
i am collecting usb usage details of all users and convert it into csv files so that i can export it into some database..
the input text file is as follows:-
USB History Dump
by nabiy (c)2008
(1) --- Kingston DataTraveler 130 USB... (2 Replies)
Discussion started by: certteam
2 Replies
7. Shell Programming and Scripting
Hi Folks,
I have written a perl script that reads data from excel sheet(.xls) using Spreadsheet::ParseExcel module. But the problem is this module doesn't work for excel sheets with extension .xlsx.
I have gone through Spreadsheet::XLSX module with which we can read from .xlsx file directly.... (1 Reply)
Discussion started by: giridhar276
1 Replies
8. Shell Programming and Scripting
Hi All,
I've got in a situation where I need to convert .xlsx or .xls formatted files into simple text file or .csv file.
I've found many options but doing this using PERL script is the best way I believe.I'm in AIX box.
Perl code should have 2 params while running. i.e
perl... (1 Reply)
Discussion started by: manab86
1 Replies
9. Shell Programming and Scripting
I am new to html and need to convert the attached csv file data to html format ; running into issues. please assist.
#!/bin/ksh
echo "<html>" ;
echo "<head><style> table {border-collapse: collapse;} table, td, th {border: 1px solid black;} </style></head>"
echo "<title> REPORT </title>"
echo... (0 Replies)
Discussion started by: archana25
0 Replies
10. Shell Programming and Scripting
Hi All,
I am new to shell scripting i am trying to convert the listner.log to csv which can be inturn converted to excel for easy reading.
i used this command
awk '/SID=/ && /HOST=/ && /PORT=/ && /USER=/ {
i=match($0,"SID="); i=i+RLENGTH; h0=substr($0,i);
i=match(h0,")");... (6 Replies)
Discussion started by: skoshekay
6 Replies