KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a file, lets say "bigfile", with tabular data of the following form, a1 b2 a3 1 b1 a2 c3 0 ... and so on. I want to use the built-in "sort" program on my Linux machine so sort this file by the fourth field(numeric) and then by the first field at the same time. I went through the man pages a couple of times and all I could come up with was, sort -n -k4,4 -k1,1 bigfile Is there a way to make "sort" do what I want or I have to write my own custom program? Thank you.
Tags (comma-separated)
Save Edits
Cancel