git://git.iain.cx/iain
/
profile.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
3a26d0537c2a15a28d94074ae338a9323250220c
[profile.git]
/
opt
/
bin
/
lensort
1
#!/bin/bash
2
3
if [ "$1" = "-r" ]; then
4
shift
5
sort_opts="-r"
6
fi
7
8
awk 'BEGIN { FS=RS }; { print length, $0 }' ${1+"$@"} |
9
sort -n $sort_opts |
10
sed 's/^[0-9][0-9]* //'