Article 4Z814 Problem sorting file

Problem sorting file

by
aikempshall
from LinuxQuestions.org on (#4Z814)
I have a file

Quote:
Mrs,NJ,Nicola,
Mr,SP,Stuart,D
Mrs,R,Rhian,Ro
Mr,S,Sam,Barto
Mrs,SA,Susan,R
Mr,S,Scott,Bro
Mrs,S,Shiralee,
Mr,S,Stephen,C
Mr,S,Symon,Wil
Mrs,TM,Tracey,
Mr,SV,Stephen,
I want to sort it into title order so the male title comes before the female title. So I use -

Code:sort < input.unsortedWhich gives me

Quote:
Mrs,NJ,Nicola,
Mr,SP,Stuart,D
Mrs,R,Rhian,Ro
Mr,S,Sam,Barto
Mrs,SA,Susan,R
Mr,S,Scott,Bro
Mrs,S,Shiralee,
Mr,S,Stephen,C
Mr,S,Symon,Wil
Mrs,TM,Tracey,
Mr,SV,Stephen,
The file appears to remain unsorted!

Alexlatest?d=yIl2AUoC8zA latest?i=6wfONdgf1KY:vwBHrK0L1Ag:F7zBnMy latest?i=6wfONdgf1KY:vwBHrK0L1Ag:V_sGLiP latest?d=qj6IDK7rITs latest?i=6wfONdgf1KY:vwBHrK0L1Ag:gIN9vFw6wfONdgf1KY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments