|
|
Question : Using Unix sort command to sort both alphabetically and numerically
|
|
Suppose I have a text file like this:
Agassi,Andre,USA,US Open,1994,M Agassi,Andre,USA,Wimbledon,1992,M Williams,Venus,USA,Wimbledon,2008,F Williams,Serena,USA,Australian Open,2009,F Graf,Steffi,Germany,French Open,1993,F Sampras,Pete,USA,US Open,2002,M Sampras,Pete,USA,US Open,1993,M
I want to sort it by last name, first name, year, i.e.:
Agassi,Andre,USA,Wimbledon,1992,M Agassi,Andre,USA,US Open,1994,M Graf,Steffi,Germany,French Open,1993,F Sampras,Pete,USA,US Open,1993,M Sampras,Pete,USA,US Open,2002,M Williams,Serena,USA,Australian Open,2009,F Williams,Venus,USA,Wimbledon,2008,F
Can I use the sort command to sort this text file by those 3 fields and pipe the output to more?
Thanks DTXCF
|
Answer : Using Unix sort command to sort both alphabetically and numerically
|
|
|
|
|
|
|