Subject: Re: text processing tool
To: None <shnek@chemi.muni.cz>
From: Perry E. Metzger <perry@piermont.com>
List: netbsd-help
Date: 03/12/2003 10:24:02
You can do this in perl by reading stuff into a two-dimensional array
and then printing it out in the other order. Awk only has 1D arrays I
believe.
Perry
Lubos Vrbka <shnek@chemi.muni.cz> writes:
> hi guys,
>
> does in netbsd exist any utility that would convert column-formatted
> text file to row-formatted text file? (eqivalent to matrix
> transposition, i.e.:
>
> 1 2 3 4 5 1 a b c d
> a a a a a 2 a b c d
> b b b b b to 3 a b c d
> c c c c c 4 a b c d
> d d d d d 5 a b c d
>
> or is it possible to force awk to process columns and not rows?
>
> regards,
> lubos
>
> --
> -
> #################################################
> Lubos Vrbka
> National Centre for Biomolecular Research
> Masaryk university, Brno, Czech Republic
>
> shnek@chemi.muni.cz
> http://www.chemi.muni.cz/~shnek
> tel. +420 541 129 508
> #################################################
>
>
>
--
Perry E. Metzger perry@piermont.com