[buug] Sorting columns?

johnd john at jjdev.com
Mon Aug 4 11:37:47 PDT 2003


Check out awk

On Sun, Aug 03, 2003 at 12:11:44PM -0700, Claude Rubinson wrote:
> Is there a utility out there for sorting columns of text?  I have a
> dataset for which I want to reorder the columns of variables.  (It
> would be nice to be able to specify the order of the columns but
> alphabetically would be fine.)
> 
> One option would be to transpose the rows and columns, pipe the output
> through sort, and transpose the data set back again.  Is anybody aware
> of transpose utility (rot won't work because it operates on columns of
> characters rather than delimiters and rs appears to be seriously
> broken).
> 
> Thanks,
> 
> Claude
> _______________________________________________
> Buug mailing list
> Buug at weak.org
> http://www.weak.org/mailman/listinfo/buug

-- 
Those who do not understand Unix are condemned to reinvent it, poorly.
--Henry Spencer (Usenet signature, November 1987)




More information about the buug mailing list