Sponsored Content
Full Discussion: Flat File Conversion Format
Top Forums UNIX for Advanced & Expert Users Flat File Conversion Format Post 302072320 by Loobian on Monday 1st of May 2006 02:32:49 PM
Old 05-01-2006
Flat File Conversion Format

Hi all,

I've a flat file in this format:
[] = [2 empty lines]
"
Record 1
[]
Field1 -> XXXX
Field2 -> 9558
Field3 -> 55AA
[]
Record 2
[]
Field1 -> YYYY
Field2 -> 12345
Field3 -> aa23
[]
"

And i want to convert it to

XXXX|9558|55AA
YYYY|12345|aa23

so it can be loaded into an oracle table;

Any sugestions; (awk)?

Thnks in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

DateTime Format Conversion in a File

Hi Pals. I have a file which is in the below format. 2007/10/15-12:04:24,'CRLift','TH-42PX75U','BestBuy','W01P0207',22,15,'User1' 2007/10/15-12:04:26,'CRLift','TH-42PX75U','BestBuy','W01P0207',22,15,'User2' 2007/10/15-12:04:29,'CRLift','TH-42PX75U','BestBuy','W01P0207',22,15,'User3'... (4 Replies)
Discussion started by: srikanthgr1
4 Replies

2. Shell Programming and Scripting

format a flat file

i have a flat file with around 700 columns . i want to break it into a flat file with say five columns like col1,col2,col3,col4 col5,col6,col7,col8 col9...... ,col700 how can i do this (5 Replies)
Discussion started by: r_t_1601
5 Replies

3. Shell Programming and Scripting

Flat file to csv conversion

Hi Guy's can someone help me in converting the following I have a flat text file which has several thousand lines which I need to convert to a csv it's got a consistent format but basically want every time it hit's txt to create a new line with the subsequent lines comma delimited for example ... (6 Replies)
Discussion started by: p1_ben
6 Replies

4. Ubuntu

Conversion of the format of a file in linux

How to convert a rtf file to a ttf file in ubuntu terminal? (2 Replies)
Discussion started by: poonam.gaigole
2 Replies

5. Shell Programming and Scripting

Conversion of below Tabs Tex file into CSV format file : shell script needed

Request if some one could provide me shell script that converts the below "input file" to "CSV format file" given Name Domain Contact Phone Email Location ----------------------- ------------------------------------------------ ------- ----- ---------------------------------... (7 Replies)
Discussion started by: sreenath1037
7 Replies

6. UNIX for Advanced & Expert Users

Converting the date format in a flat file

Hi All, I am new to this forum, could any one help me out in resolving the below issue. Input of the flat file contains several lines of text for example find below: 5022090,2,4,7154,88,,,,,4/1/2011 0:00,Z,L,2 5022090,3,1,6648,88,,,,,4/1/2011 0:00,Z,,1... (0 Replies)
Discussion started by: av_sagar
0 Replies

7. Shell Programming and Scripting

conversion of spaces into CSV format file

INput file attached in thread : Column widths at 24,73,82,87,121 characters (sed 's/./,/24;s/./,/73;s/./,/81;s/./,/87;s/./,/121;s/ *, */,/g' fixedinputfile >output.csv ). The client wants instead of hard coding the column widths as they are not fixed .he has given the hint stating that ( ... (3 Replies)
Discussion started by: sreenath1037
3 Replies

8. UNIX for Dummies Questions & Answers

Conversion of flat file to Mainframe file

Hi guys, I have a flat file created by ETL tool. Now the flat file has 4 columns. 1st column is a Character(17), 2nd Column Character(4), 3rd column is a decimal column and 4th column is also a decimal column. I have to convert this file into a Mainframe file in the following format. ... (4 Replies)
Discussion started by: mac4rfree
4 Replies

9. Shell Programming and Scripting

How to change the format of the date column in a flat file?

Hi, i have a flat file namely temp.txt with this data below ID|name|contact_date 101|Kay|2013-12-26 102|let|2013-12-26 I need to modify the date data in the flat file into MM/DD/YYYY HH24:MI:SS format let me know the code for this. Thank you! (5 Replies)
Discussion started by: srikanth_sagi
5 Replies

10. Shell Programming and Scripting

awk Flat File Conversion Script

In awk how would I flatten input.txt to output.txt? Input: givenname: Darth sn: Vadar mail: d.vadar@deathstar.com uid: dv12345 orclguid: 1234567890 givenname: Carlito sn: Brigante mail: c.brigante@paradise.com uid: cb12345 orclguid: 2134567890 Output: ... (3 Replies)
Discussion started by: u20sr
3 Replies
DateTime::Locale::pa_Arab(3pm)				User Contributed Perl Documentation			    DateTime::Locale::pa_Arab(3pm)

NAME
DateTime::Locale::pa_Arab - DateTime locale package for "pa_Arab" SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'pa_Arab' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Punjabi Arabic. DATA
This locale inherits from the DateTime::Locale::pa locale. It contains the following data. Days Wide (format) XXX XXXX XXXX XXXXXX XXXX XXXX XXXXX Abbreviated (format) XXX XXXX XXXX XXXXXX XXXX XXXX XXXXX Narrow (format) XX XX XXX XX XXXX XX X Wide (stand-alone) XXX XXXX XXXX XXXXXX XXXX XXXX XXXXX Abbreviated (stand-alone) XXX XXXX XXXX XXXXXX XXXX XXXX XXXXX Narrow (stand-alone) XX XX XXX XX XXXX XX X Months Wide (format) XXXXX XXXXX XXXX XXXXX XX XXX XXXXXX XXXX XXXXX XXXXXX XXXXX XXXXX Abbreviated (format) XXXXX XXXXX XXXX XXXXX XX XXX XXXXXX XXXX XXXXX XXXXXX XXXXX XXXXX Narrow (format) X X XX X X XX XX X X X X X Wide (stand-alone) XXXXX XXXXX XXXX XXXXX XX XXX XXXXXX XXXX XXXXX XXXXXX XXXXX XXXXX Abbreviated (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Narrow (stand-alone) X X XX X X XX XX X X X X X Quarters Wide (format) XXXXXX XXXXX XXXXXX XXXX XXXXXX XXXX XXXXXX XXXXX Abbreviated (format) XXXXXX XXXXX XXXXXX XXXX XXXXXX XXXX XXXXXX XXXXX Narrow (format) 1 2 3 4 Wide (stand-alone) XXXXXX XXXXX XXXXXX XXXX XXXXXX XXXX XXXXXX XXXXX Abbreviated (stand-alone) XXXXXX XXXXX XXXXXX XXXX XXXXXX XXXX XXXXXX XXXXX Narrow (stand-alone) 1 2 3 4 Eras Wide XXXXXXXX XX Abbreviated XXXXXXXX XX Narrow XXXXXXXX XX Date Formats Full 2008-02-05T18:30:30 = XXXX, 05 XXXXX 2008 1995-12-22T09:05:02 = XXXX, 22 XXXXX 1995 -0010-09-15T04:44:23 = XXXX, 15 XXXXX -10 Long 2008-02-05T18:30:30 = 5 XXXXX 2008 1995-12-22T09:05:02 = 22 XXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXX -10 Medium 2008-02-05T18:30:30 = 5 XXXXX 2008 1995-12-22T09:05:02 = 22 XXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXX -10 Short 2008-02-05T18:30:30 = 05/02/2008 1995-12-22T09:05:02 = 22/12/1995 -0010-09-15T04:44:23 = 15/09/-010 Default 2008-02-05T18:30:30 = 5 XXXXX 2008 1995-12-22T09:05:02 = 22 XXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXX -10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 XXXX UTC 1995-12-22T09:05:02 = 9:05:02 XXXXX UTC -0010-09-15T04:44:23 = 4:44:23 XXXXX UTC Long 2008-02-05T18:30:30 = 6:30:30 XXXX UTC 1995-12-22T09:05:02 = 9:05:02 XXXXX UTC -0010-09-15T04:44:23 = 4:44:23 XXXXX UTC Medium 2008-02-05T18:30:30 = 6:30:30 XXXX 1995-12-22T09:05:02 = 9:05:02 XXXXX -0010-09-15T04:44:23 = 4:44:23 XXXXX Short 2008-02-05T18:30:30 = 6:30 XXXX 1995-12-22T09:05:02 = 9:05 XXXXX -0010-09-15T04:44:23 = 4:44 XXXXX Default 2008-02-05T18:30:30 = 6:30:30 XXXX 1995-12-22T09:05:02 = 9:05:02 XXXXX -0010-09-15T04:44:23 = 4:44:23 XXXXX Datetime Formats Full 2008-02-05T18:30:30 = XXXX, 05 XXXXX 2008 6:30:30 XXXX UTC 1995-12-22T09:05:02 = XXXX, 22 XXXXX 1995 9:05:02 XXXXX UTC -0010-09-15T04:44:23 = XXXX, 15 XXXXX -10 4:44:23 XXXXX UTC Long 2008-02-05T18:30:30 = 5 XXXXX 2008 6:30:30 XXXX UTC 1995-12-22T09:05:02 = 22 XXXXX 1995 9:05:02 XXXXX UTC -0010-09-15T04:44:23 = 15 XXXXX -10 4:44:23 XXXXX UTC Medium 2008-02-05T18:30:30 = 5 XXXXX 2008 6:30:30 XXXX 1995-12-22T09:05:02 = 22 XXXXX 1995 9:05:02 XXXXX -0010-09-15T04:44:23 = 15 XXXXX -10 4:44:23 XXXXX Short 2008-02-05T18:30:30 = 05/02/2008 6:30 XXXX 1995-12-22T09:05:02 = 22/12/1995 9:05 XXXXX -0010-09-15T04:44:23 = 15/09/-010 4:44 XXXXX Default 2008-02-05T18:30:30 = 5 XXXXX 2008 6:30:30 XXXX 1995-12-22T09:05:02 = 22 XXXXX 1995 9:05:02 XXXXX -0010-09-15T04:44:23 = 15 XXXXX -10 4:44:23 XXXXX Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 XXXX 1995-12-22T09:05:02 = 22 XXXX -0010-09-15T04:44:23 = 15 XXXX HHmmss (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 XXXX 1995-12-22T09:05:02 = 9:05 XXXXX -0010-09-15T04:44:23 = 4:44 XXXXX Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 XXXX 1995-12-22T09:05:02 = 9:05:02 XXXXX -0010-09-15T04:44:23 = 4:44:23 XXXXX M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d/M) 2008-02-05T18:30:30 = 5/2 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/9 MEd (E, M-d) 2008-02-05T18:30:30 = XXXX, 2-5 1995-12-22T09:05:02 = XXXX, 12-22 -0010-09-15T04:44:23 = XXXX, 9-15 MMM (LLL) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 MMMd (MMM d) 2008-02-05T18:30:30 = XXXXX 5 1995-12-22T09:05:02 = XXXXX 22 -0010-09-15T04:44:23 = XXXXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XXXX XXXXX 5 1995-12-22T09:05:02 = XXXX XXXXX 22 -0010-09-15T04:44:23 = XXXX XXXXX 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = XXXXX 5 1995-12-22T09:05:02 = XXXXX 22 -0010-09-15T04:44:23 = XXXXX 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XXXX XXXXX 5 1995-12-22T09:05:02 = XXXX XXXXX 22 -0010-09-15T04:44:23 = XXXX XXXXX 15 mmss (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = XXXX, 2008-2-5 1995-12-22T09:05:02 = XXXX, 1995-12-22 -0010-09-15T04:44:23 = XXXX, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXXXX 1995-12-22T09:05:02 = 1995 XXXXX -0010-09-15T04:44:23 = -10 XXXXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XXXX, 2008 XXXXX 5 1995-12-22T09:05:02 = XXXX, 1995 XXXXX 22 -0010-09-15T04:44:23 = XXXX, -10 XXXXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXX 1995-12-22T09:05:02 = 1995 XXXXX -0010-09-15T04:44:23 = -10 XXXXX yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 XXXXXX XXXXX 1995-12-22T09:05:02 = 1995 XXXXXX XXXXX -0010-09-15T04:44:23 = -10 XXXXXX XXXX yyMMM (MMM yy) 2008-02-05T18:30:30 = XXXXX 08 1995-12-22T09:05:02 = XXXXX 95 -0010-09-15T04:44:23 = XXXXX -10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 Miscellaneous Prefers 24 hour time? No Local first day of the week XXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.10.1 2010-03-19 DateTime::Locale::pa_Arab(3pm)
All times are GMT -4. The time now is 01:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy