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