Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am highly frustrated by the behaviour of the standard unix sort command, which seems to always sort on all fields of a line, even if I specify one field to sort on.
If input of sort is like:
'cat input | sort +1' will always produce the following output:
Note that the output is also sorted on field0, though noone told sort to sort on field0.
Is there a way to tell sort not to sort on a specific field, i.e. leaving the lines in the positional order, instead?
My intention is that the sort output should be like this:
(i.e. it is not sorted on field0, only on field1)
Thank you for the tips, both worked.
I already tried out a sort -k command, which (now I know) did not work as I thought the first data is field 0, the second is field 1, so tried sort -k 1,1 and dropped the idea when it did not work.