Bash: "sort" does not sortForum: Apps Topic: Bash: "sort" does not sort started by: seevee Posted by seevee on Jan. 27 2009,21:29
If I enter the following code to sort a file with columns separated by colons,
the result is that the file is sorted by the third field. In fact, it does not seem to matter which field I identify after the -k option. It sorts every time by the third field. In another file with fixed length columns, I tried the code
and the result was the same regardless of which column I sorted by. What am I doing wrong? What other information can I provide to help identify the problem? Thank you in advance. Posted by WDef on Jan. 27 2009,23:49
Works ok for me on this file:
Post an example of the data in your file. Posted by seevee on Jan. 28 2009,13:37
The data is phone numbers, names, and dates. Example...
It works for me, too - in Ubuntu. My version is DSL 4.2.4 Posted by WDef on Jan. 28 2009,16:58
I take it you have loaded gnuutils.dsl?If $ ls -l /usr/bin/sort shows a link to Busybox, then you are using Busybox's sort, which has a greatly reduced option set. Posted by seevee on Jan. 28 2009,18:06
Awesome help! Thank you.
|