Tuesday, December 29, 2015

bash - sort file by line length


useful
cat <file> | awk '{ print length, $0 }' | sort -n -s | cut -d" " -f2-