Last active
January 2, 2019 21:55
-
-
Save doekman/4f266ccfe9cb0d300e00ca73ef6cddf4 to your computer and use it in GitHub Desktop.
Command-line program that sorts standard input as a human would expect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rewrite from python ;-) | |
alias human_sort="sort --version-sort --ignore-case" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Line 1 | |
Line 2 | |
Line 12 | |
24 lines in this example | |
Line 3 | |
Line 11 | |
Row 12 column 1 | |
Line 5 | |
Row 12 column 2 | |
Row 1 column 1 | |
These lines are sorted as expected | |
Line 6 | |
Chapter 1.1 | |
Line 9 | |
Chapter 2.2.3 | |
Chapter 2.2.04 | |
Chapter 2.1 | |
Chapter 2 | |
Chapter 1.3 | |
Line 7 | |
Line 4 | |
Good examples are rare | |
Line 10 | |
Line 8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment