seevee

Group: Members
Posts: 10
Joined: Nov. 2008 |
 |
Posted: Jan. 27 2009,21:29 |
 |
If I enter the following code to sort a file with columns separated by colons,
Code Sample | sort -t: -k 4 file.file |
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
Code Sample | sort -k 4 file.file |
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.
|