Skip to content

Instantly share code, notes, and snippets.

@woodrow
Created February 24, 2011 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woodrow/841477 to your computer and use it in GitHub Desktop.
Save woodrow/841477 to your computer and use it in GitHub Desktop.
sort --debug is kind of awesome. See http://utools.ca/journal/2011/02/23/sort-debug-is-handy/
woodrow@woodrow-x200:~/tmp$ cat sort_test
1.2.3.4
2.3.4.5
12.3.2.4
12.2.3.4
12.2.3.5
11.2.3.4
1.12.3.4
20.2.3.4
21.2.3.4
12.2.3.6
12.2.3.5
woodrow@woodrow-x200:~/tmp$ /home/woodrow/bin/sort -n --debug sort_test
/home/woodrow/bin/sort: using simple byte comparison
1.12.3.4
____
________
1.2.3.4
___
_______
2.3.4.5
___
_______
11.2.3.4
____
________
12.2.3.4
____
________
12.2.3.5
____
________
12.2.3.5
____
________
12.2.3.6
____
________
12.3.2.4
____
________
20.2.3.4
____
________
21.2.3.4
____
________
woodrow@woodrow-x200:~/tmp$ /home/woodrow/bin/sort -n -s --debug sort_test
/home/woodrow/bin/sort: using simple byte comparison
1.12.3.4
____
1.2.3.4
___
2.3.4.5
___
11.2.3.4
____
12.2.3.4
____
12.2.3.5
____
12.2.3.6
____
12.2.3.5
____
12.3.2.4
____
20.2.3.4
____
21.2.3.4
____
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment