I have trouble understanding unix sort. Consider the following file (tab separated)
aa ~ a1 aa B b A b ~ e bb B bb ~ B
cat tmp2 | sort -t $'\t' -k1,2
aa ~ a1 aa B b A bb B bb ~ B b ~ e
As far as I understand, -t $'\t' says to consider the separator to be a tab instead of a white space and -k1,2 says to sort by the first column and, if two rows have the same fist column, then by the second one. But in that case, shouldn't my last 'b' appear in the fourth row?