12

Tip #92   Sort a file by line length

Sort a file by line length:


cat test.txt | awk '{ printf "%06d|%s\n",length($0),$0}' | sort | cut -b'8-'