Sort by Line Length
Tagged with: awk, command, length, line, Linux, sort
Tuesday, April 14th, 2009 11:24 PM
Sort file by line length. Original Article…
cat /etc/passwd | awk '{print length, $0}' | sort -n | awk '{$1=""; print $0 }'
Sort file by line length. Original Article…
cat /etc/passwd | awk '{print length, $0}' | sort -n | awk '{$1=""; print $0 }'
Sort contents of two files by viewing only duplicate line
sort file1 file2 | uniq -d
Sort contents of a file and remove repeated lines
sort file.txt | uniq
Show size of the files and directories sorted by size
du -sk * | sort -rn
A Linux command to sort the contests of a file
sort file.ext
[tags][/tags]