git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Gitify the working tree.
[profile.git]
/
opt
/
bin
/
lensort
diff --git a/opt/bin/lensort
b/opt/bin/lensort
new file mode 100755
(executable)
index 0000000..
3a26d05
--- /dev/null
+++ b/
opt/bin/lensort
@@ -0,0
+1,10
@@
+#!/bin/bash
+
+if [ "$1" = "-r" ]; then
+ shift
+ sort_opts="-r"
+fi
+
+awk 'BEGIN { FS=RS }; { print length, $0 }' ${1+"$@"} |
+sort -n $sort_opts |
+sed 's/^[0-9][0-9]* //'