sed -r 's/^([^:]+):([^ ]+) ([^:]+):.*$/- &/' your-file.txt | \
sort | sed -r 's/[^ ]+ (.*)//'
Exemplo:
$ sed -r 's/^([^:]+):([^ ]+) ([^:]+):.*$/- &/' your-file.txt | sort | sed -r 's/[^ ]+ (.*)//'
east:Lilly Batsuro:58:85:84:52
east:Shirley Couts:66:57:67:37
east:Daniel Liebelt:83:78:84:61
east:James Peringer:50:62:56:94
east:Sam Smith:52:72:78:62
west:Carmen Gondar:62:58:85:56
west:Kim Husak:89:91:63:64
west:Alex Opitz:79:68:57:93
west:Lenny Taufa:53:61:82:52
west:Derek Willard:63:69:74:43
A propósito, é assim que sort
seleciona o primeiro campo e o segundo campo quando você o executa com sort -k1,1 -k2,2
:
$ sort --debug -k1,1 -k2,2 ttt.txt
east:Daniel Liebelt:83:78:84:61
___________
____________________
_________________________________
east:James Peringer:50:62:56:94
__________
_____________________
_________________________________
east:Lilly Batsuro:58:85:84:52
__________
____________________
________________________________
east:Sam Smith:52:72:78:62
________
__________________
____________________________
east:Shirley Couts:66:57:67:37
____________
__________________
________________________________
west:Alex Opitz:79:68:57:93
_________
__________________
_____________________________
west:Carmen Gondar:62:58:85:56
___________
___________________
________________________________
west:Derek Willard:63:69:74:43
__________
____________________
________________________________
west:Kim Husak:89:91:63:64
________
__________________
____________________________
west:Lenny Taufa:53:61:82:52
__________
__________________