Sunday, November 16, 2008

Unix sort on multiple columns

=============== THIS IS NOT QUITE RIGHT! LOOK AT UPDATED BLOG POST IN JANUARY 2010 ===============

To sort on multiple columns using the unix sort command, use the -k option multiple times.

IE, to sort first on column 2, then on column 1, use:

sort -k 2 -k 1 inFile > outFile

To sort the columns in numerical order (instead of string order), put an "n" after the column numbers. ie

sort -k 2n -k 1n inFile > outFile

Friday, November 14, 2008

Area Under Curve with Open Office / Excel

If you have the curve points, here's how to find the area under the curve in Open Office or Excel



(Taken from http://people.stfx.ca/bliengme/ExcelTips/AreaUnderCurve.htm )