Format of Output File...

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
mr991
Posts: 1
Joined: Sun Apr 14, 2013 1:46 am

Format of Output File...

Post by mr991 »

Hi:

I am processing a text file on which each line has to be processed individually. I need to be able to control the format of the output file (i.e. I want to control when to output

Input File:

Name: aaaa.bbbb
Address: 216 N Avenue
Address2: LA, CA

I want the output file to be like this:

aaaa.bbbb<tab>216 N Avenue<tab>LA,CA

I have not been able to find a control that allows me to do the above. It is import to delete some columns from multiple lines in the input file and output them to SAME LINE on the output file. So far, I've used the remove field<tab delimited> and I'm able to delete the columns I want.

However, textpipe processes a line, removes the fields i want and then outputs what I want on the same lines and moves to the next line. Essentially, textpipe processes the first line and then outputs the first line. Then it processes the 2nd line from the input and moves on to the 2nd line on the output.

I want textpipe to process multiple lines from the input and output certain columns in the output line and move on to the next line on the output when I want it to.

Any help to achieve the above would be appreciated.

Martin
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Format of Output File...

Post by DataMystic Support »

Hi Martin,

Just use an EasyPattern search/replace:

Code: Select all

Name: [ capture(1+chars) as 'name' ]
Address: [ capture(1+chars) as 'addr1' ]
Address2: [ capture(1+chars) as 'city' ], [ capture(1+chars) as 'state' ]
Replace with:

Code: Select all

@name@\t@addr1@\t@city@\t@state@
Post Reply