Thursday, September 12, 2013

# Order lines of a file by the length of the line descending.


awk '{print length($0),$0}' names.txt | sort -nr | cut -d' ' -f2-

No comments:

Post a Comment