home
|
archive
|
lists
|
rpg
|
howto
|
other
|
about
sort a file by line length
this is a test
cat test | awk '{ print length, $0 }' | sort -n | cut -d" " -f2-
a is test this
https://stackoverflow.com/questions/5917576/sort-a-text-file-by-line-length-including-spaces