Aaron Tippin - Everything I Own.mp3
Aaron Tippin - Honky-Tonk Superman.mp3
Aaron Tippin - How’s The Radio Know.mp3
Aaron Tippin - I Can Help.mp3
Aaron Tippin - If I Had It To Do Over.mp3
Aaron Tippin - If Only Your Eyes Could Lie.mp3
Aaron Tippin - I Got It Honest.mp3
Aaron Tippin - I Miss Misbehavin’.mp3
Aaron Tippin - I Promised You The World.mp3
Aaron Tippin - I Was Born With A Broken Heart.mp3
Can someone give me an idea why the song titles that begin with If are sorting in the wrong place. I thought maybe there was a hidden character but I renamed the file by completely retyping the filename and it still sorts incorrectly.
so definitely no hidden character cause the following works;
glrider@glrider-linux:~/A53MusicOutput/Like$ find . -name Aaron\ Tippin\ -\ If\ I\ Had\ It.mp3 | awk -F"/" ‘{print $3}’ | sort | more
Aaron Tippin - If I Had It To Do Over.mp3
glrider@glrider-linux:~/A53MusicOutput/Like$
So it seems the sort is happening minus the spaces because I also see the following in the results;
ABBA - I Do, I Do, I Do, I Do, I Do.mp3
ABBA - If It Wasn’t For The Nights.mp3
ABBA - I Have A Dream.mp3
I there were no spaces the sort would be correct.
Okay I should have done a google search first. Setting export LC_ALL=C gives me the traditional sorting method I would expect. According to the google search, the way it was sorting is called a Library or Dictionary search, which ignores whitespace.