Skip to main content

Timeline for Alphabetize Integers

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Jun 17, 2020 at 9:04 history edited CommunityBot
Commonmark migration
Dec 10, 2016 at 20:22 comment added Ilmari Karonen This answer appears to be locale-dependent: in the en_US.UTF-8 locale this correctly sorts 44 before 40004 for me (on Ubuntu), because in this locale sort apparently ignores the difference between hyphens and spaces. In the default C locale, however, it's broken, because in that locale all sorting is done in pure ASCII order, so that hyphen sorts after space.
Dec 3, 2016 at 2:02 comment added Digital Trauma @izabera Sorry - I was mistaken. I thought /bin/sh was symlinked to /bin/bash on my Ubuntu 16.04 VM, but its not - it is symlinked to /bin/dash. Conversely on my macOS machine it is /bin/bash and you're right - <<< does work in in sh. But this answer won't work on macOS because of the dependency on bsdgames number which I don't want to jump through the hoops of to install on macOS. I'm sure there are other Linux distros out there that will allow the <<< version of this answer, but I'm sticking with Ubuntu for now.
Dec 3, 2016 at 0:13 comment added izabera bash never turns off <<<, not even in posix mode
Dec 2, 2016 at 23:32 comment added Digital Trauma @izabera Nope - if bash as started as sh it tries to emulate Posix sh as much as possible, which means that bashisms such as <<< are turned off. GNU sed's eval feature starts commands with /bin/sh -c ... and not /bin/bash -c .... Have you tried this?
Dec 2, 2016 at 22:49 comment added izabera it works fine as long as your sh is bash :P
Dec 2, 2016 at 17:38 comment added Digital Trauma @izabera Yes - thanks - I removed the -t:. However, sed's eval feature runs commands using sh, so bash features like <<< won't work.
Dec 2, 2016 at 17:36 history edited Digital Trauma CC BY-SA 3.0
deleted 35 characters in body
Dec 2, 2016 at 2:06 comment added izabera -t: is useless and you can use number<<<&
Dec 2, 2016 at 1:08 history answered Digital Trauma CC BY-SA 3.0