getting mixed-up data into tab delimited columns
Posted: Wed Jan 18, 2006 11:01 am
Hi,
I'm trying to get this to work - any suggestions would be appreciated...
I have used textpipe (pro version) to put a marker in front of certain types of data in a file of 17,000 lines. The marker I have inserted is the number of the column I want that piece of data to end up in. My markers are {001}, {002} ... up to {020}
So I now have a file that looks schematically like this:
{002}b{001}a{004}d{003}c
{004}d{003}c{002}b{001}a
{004}d{001}a{003}c{002}b
{004}d{003}c{002}b
{004}d{001}a{003}c
etc...
What I want is to put everything starting:
{001} in tab column 1
{002} in tab column 2
...
{017} in tab column 17
etc
So the example above would look like this (where > stands for a tab):
a>b>c>d
a>b>c>d
a>b>c>d
>b>c>d
a>>c>d
Note that only data is tagged - null fields are not tagged (e.g. lines 4 and 5 above are each missing one field - most lines in my files contain only a few fields - so I want all the null fields to contain just tabs).
Any suggestions?
Thanks
Robert
I'm trying to get this to work - any suggestions would be appreciated...
I have used textpipe (pro version) to put a marker in front of certain types of data in a file of 17,000 lines. The marker I have inserted is the number of the column I want that piece of data to end up in. My markers are {001}, {002} ... up to {020}
So I now have a file that looks schematically like this:
{002}b{001}a{004}d{003}c
{004}d{003}c{002}b{001}a
{004}d{001}a{003}c{002}b
{004}d{003}c{002}b
{004}d{001}a{003}c
etc...
What I want is to put everything starting:
{001} in tab column 1
{002} in tab column 2
...
{017} in tab column 17
etc
So the example above would look like this (where > stands for a tab):
a>b>c>d
a>b>c>d
a>b>c>d
>b>c>d
a>>c>d
Note that only data is tagged - null fields are not tagged (e.g. lines 4 and 5 above are each missing one field - most lines in my files contain only a few fields - so I want all the null fields to contain just tabs).
Any suggestions?
Thanks
Robert