Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: data transformation

Re: data transformation

From: ray <ray_at_zianet.com>
Date: Wed, 14 Feb 2007 21:08:32 -0700
Message-ID: <pan.2007.02.15.04.08.31.281964@zianet.com>


On Wed, 14 Feb 2007 09:03:06 -0700, ray wrote:

> On Tue, 13 Feb 2007 11:28:40 -0500, m.t wrote:
> 

>> I have log file with data like this:
>>
>> 20608694;20416953;20420430;20414156;20409061;20606877;20609113;20607051;20607052;20608204;
>> 20418197;20408410;20606460;20606462;20607297;20607356;20415876;20426551;20419862;20421635;
>>
>> Is there a way (Windows or Unix) to transform it to single column ?
>>
>> 20608694;
>> 20416953;
>> 20420430;
>> 20414156;
>> 20409061;
>> 20606877;
>> 20609113;
>> 20607051;
>> 20607052;
>> 20608204;
>> 20418197;
>> 20408410;
>> 20606460;
>> 20606462;
>> 20607297;
>> 20607356;
>> 20415876;
>> 20426551;
>> 20419862;
>> 20421635;
> 
> I believe the simplest, most readable solution would be to use 'tr' to
> translate ';' to ';\n'.


tr -s ';' '\n' <inputfile >outputfile

will work if you don't mind not seeing the ';' in the output. Received on Wed Feb 14 2007 - 22:08:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US