I have a file with lines that all begin with a date, followed by a tab, followed by a random number of words and spaces—some of which include numbers. For example:
20140217 iPhone Upgrade Available
20131101 Job Application Due
20131219 Renew or return all library books
20131114 Pay cell phone bill
I'm trying to sort this file by the date string and only the date string.
As per this thread, I've tried all kinds of combinations of sort -t$'\t' and -k1, but I keep getting garbled results.
Any help would be much appreciated. Also, it IS possible for me to replace that tab with a space or another character, if that would help for any reason.