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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
sru::response::record
SRU::Response::Record(3pm) User Contributed Perl Documentation SRU::Response::Record(3pm)
NAME
SRU::Response::Record - A class for representing a result record in a searchRetrieve response.
SYNOPSIS
my $record = SRU::Response::Record->new();
$record->recordData( '<title>Huck Finn</title>' );
$response->addRecord( $record );
DESCRIPTION
SRU::Response::Record is used to bundle up the information about a particular metadata record in a SRU::Response::SearchRetrieve object.
Typically you'll construct a record object and add it to the SearchRetrieve response.
METHODS
new()
You must supply the recordSchema and recordData parameters. recordPacking, recordPosition, and extraRecordData may also be supplied.
my $record = SRU::Response::Record->new(
recordSchema => 'info:srw/schema/1/dc-v1.1',
recordData => '<title>Huckleberry Finn</title>'
);
recordSchema()
The URI identifier of the XML schema in which the record is encoded. Although the request may use the server's assigned short name, the
response must always be the full URI.
recordData()
The record itself, either as a string or embedded XML. If would like to pass an object in here you may do so as long as it imlements the
asXML() method.
recordPacking()
The packing used in recordData, as requested by the client or the default: "XML".
recordPosition()
The position of the record within the result set. If you don't pass this in recordPosition will be automaticlly calculated for you when add
or retrieve a record from a SRU::Response::SearchRetrieve object.
extraRecordData()
Any extra data associated with the record. See the section on extensions for more information.
asXML()
perl v5.12.4 2009-11-20 SRU::Response::Record(3pm)