sort with tab field separator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You would think specifying tab as a field separator for sort would work 
like this:

cat file | sort -k 3 -t "\t"

It doesn't:

sort: multi-character tab `\\t'


So after a little search and some trial and error I got this to work:

cat file | sort -k 3 -t "`/bin/echo -e '\t'`"


For my own curiosity, can someone please illuminate me as to why the 
first incantation does not work as expected? Is there a more natural way 
to specify \t other than echo?


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux