Usage: ./msort [-hrfn] [-t <filed_separators>] [-k [rfmn]<col>[start-end]{enum1,...},...] [<file>]
Options:
-h display this document
-l specify line brokers, you can define more than one characters; defaultly, they are <newline>
-t specify field separators, you can define more than one characters; defaultly, they are <space>, <tab>
-r reverse sort, it will be overwritten if fileds are specified
-f ignore character`s case, ...
-n treat fileds as number, ...
-m treat fileds as number or string, ...
-k specify fileds to be sorted, eg.
rn10[2-6]: reverse sort 2-6 (include 6) of column 10, treat it as number
n11: sort column 11, treat it as number
f2[6-]: sort 6-end of column 2, treat it as string, ignore case
rfm3: reverse sort column 3, treat it as string or number, ignore string case
f3{red green blue}: sort column 3 , treat it as enum, ignore string case
If given file, read text from file, otherwise from STDIN