JSI Tip 0686 - Freeware Fsort.

FSort is a freeware command line sort utility that is faster than sort for large files.

Place it in your path and type fsort /?:

FSORT -- Text File Sort Utility v1.1.0 
\[-i\]inpFile \[-o\]outFile \[-k\]col:wid:d,...\] \[-d\]\[kf\] \[-cyn\] \[-lyn\] 
\[-i\]inpFile             Input file to sort \[console\] 
\[-o\]outFile             Sorted Output file \[console\] 
\[\[-k\]col:wid\[:\{ad\}\],\]   Sort key(s),direction \[1::a\] 
-d\[kf\]                 Eliminate Duplicates by Key or \[Full\] \[keep\]? 
-c\[yn\]                 Case is significant? \[y\] 
-l\[yn\]                 Log output messages? \[y\] 
fsort -imyinput.dat sorted.out -k1:10,12:2:d -dn -cy 
(Sort myinput.dat to sorted.out, ascending 10-char key at Col-1, 
2-char at Col-12 descending, keep duplicates, case significant)

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.