here's something I don't remember ever noticing before, and I'm wondering how many errors I've made over the years because of it. the GNU sort utility default is to respect case; you have to give it the -f option to make it case-insensitive. at least, that's what the manpage says. in actuality:
jcomeau@aspire:~/Downloads$ echo -ne 'F9\nf7\nF5\nf0\n' | sort f0 F5 f7 F9
to make it do the expected:
jcomeau@aspire:~/Downloads$ echo -ne 'F9\nf7\nF5\nf0\n' | LC_ALL=C sort F5 F9 f0 f7
my locale is set to en_US.UTF-8, nothing abnormal. so WTAF?
Back to blog or home page
last updated 2019-12-27 09:45:59. served from tektonic