i have a question..
i have this file:
John Jones
John Smith
Jack Smith
100100 13
Helen Bold
100200 5
how can i use sort to make it look like :
Helen Bold
John Jones
Jack Smith
John Smith
100100 13
100200 5
Surname as the major key ,firstname as the minor key and numbers at the
end.
i've read the man pages and sort -k 2,2 -k 1,1 file
will sort the surname and the first name but the numbers appear at the top..
why?
i have this file:
John Jones
John Smith
Jack Smith
100100 13
Helen Bold
100200 5
how can i use sort to make it look like :
Helen Bold
John Jones
Jack Smith
John Smith
100100 13
100200 5
Surname as the major key ,firstname as the minor key and numbers at the
end.
i've read the man pages and sort -k 2,2 -k 1,1 file
will sort the surname and the first name but the numbers appear at the top..
why?