Sponsored Content
Top Forums Shell Programming and Scripting Help needed to convert delimited to CSV format Post 302281552 by zaxxon on Thursday 29th of January 2009 05:31:45 AM
Old 01-29-2009
Not sure if it's what you want, but here you go:

Code:
awk -F\| 'BEGIN{OFS=","} $2 ~ /START/ {n=$1; t=$3; next} $2 ~ /END/ && $1 == n {print n,t,$3}' infile
FILE 1,Jan 22 15:03,Jan 22 16:06
FILE 2,Jan 22 5:15,Jan 22 5:25
FILE 3,Jan 22 07:03,Jan 22 08:15
FILE 4,Jan 22 16:09,Jan 22 16:55
FILE 1,Jan 22 18:15,Jan 22 18:25

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Convert a csv file to an xls format

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

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 ... (10 Replies)
Discussion started by: azs0309
10 Replies

3. Shell Programming and Scripting

Convert XML to CSV format

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

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

5. 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

6. Shell Programming and Scripting

Convert the below file to csv format

Hi , i want to change this question, i will post soon.. (6 Replies)
Discussion started by: srikanth2567
6 Replies

7. UNIX for Dummies Questions & Answers

How to convert a text file into tab delimited format?

I have a text file that made using text editor in Ubuntu. However the text file is not being recognized as space or tab delimited, the formatting seems to be messed up. How can I convert the text file into tab delimited format? (3 Replies)
Discussion started by: evelibertine
3 Replies

8. Shell Programming and Scripting

Convert csv to pipe delimited except the ones in double quotes

I have a csv data file : A,B,C,D,"A,B",E,"GG,H" E,F,G,H,I,J,"S,P" I need to replace all "," with "|" except the ones between double quotes i.e A|B|C|D|"A,B"|E|"GG,H" E|F|G|H|I|J|"S,P" CAn someone assist? (8 Replies)
Discussion started by: Shivdatta
8 Replies

9. Shell Programming and Scripting

How to convert space&tab delimited file to CSV?

Hello, I have a text file with space and tab (mixed) delimited file and need to convert into CSV. # cat test.txt /dev/rmt/tsmmt32 HP Ultrium 6-SCSI J3LZ 50:03:08:c0:02:72:c0:b5 F00272C0B5 0/0/6/1/1.145.17.255.0.0.0 /dev/rmt/c102t0d0BEST /dev/rmt/tsmmt37 ... (6 Replies)
Discussion started by: prvnrk
6 Replies

10. Shell Programming and Scripting

UNIX/PERL script to convert XML file to pipe delimited format

Hello, I need to get few values from a XML file and output needs to be written in another file with pipe delimited format. The Header & Footer of the Pipe Delimited file will be constant. The below is my sample XML file. I need to pull the values in between the XML tags <Operator_info to... (15 Replies)
Discussion started by: karthi1305561
15 Replies
which-pkg-broke(1)						  debian-goodies						which-pkg-broke(1)

NAME
which-pkg-broke - find which package might have broken another SYNOPSIS
which-pkg-broke package DESCRIPTION
The which-pkg-broke program will retrieve a list of the named package and all its dependencies sorted by the time they were installed on the system (as determined from the mtime information of /var/lib/dpkg/info/*.list . This tool makes it possible for a system admin to obtain information that might correlate installation of package dependencies with a pack- age breakage in order to find which package update might be responsible for the breakage. EXAMPLES
This tool can be useful determine which package dependencies were upgraded more recently and might be associated with the bug that is being observed. For example, if aptitude stops working properly, an administrator can run: $ which-pkg-broke aptitude Package <libapt-pkg-libc6.3-5-3.3> has no install time info libdb1-compat Fri Aug 8 03:02:11 2003 libsigc++-1.2-5c102 Fri Aug 8 05:15:58 2003 aptitude Sun Jan 11 17:38:06 2004 libncurses5 Sun Jan 18 08:11:05 2004 libc6 Thu Jan 22 07:55:10 2004 libgcc1 Tue Jan 27 07:37:22 2004 gcc-3.3-base Tue Jan 27 07:37:31 2004 libstdc++5 Tue Jan 27 07:37:32 2004 So depending on exactly when the misbehaviour started, there may be a reason to point the finger at a more-recently updated library like libstdc++ or libncurses, which are more-recently installed than aptitude itself. SEE ALSO
rc-alert(1) AUTHOR
which-pkg-broke was written by Bill Gribble <grib AT billgribble.com> This manual page was written by Javier Fernandez-Sanguino for the Debian GNU/Linux distribution. debian-goodies July 24 2006 which-pkg-broke(1)
All times are GMT -4. The time now is 06:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy