Txt

Byte sized tech know-how.

  • Home
  • About

Tag Archives: sort

14 Apr

Sort by Line Length

Sort file by line length. Original Article…


cat /etc/passwd | awk '{print length, 0}' | sort -n | awk '{1=""; print $0 }'
admin Posted in Code, Command Line, Linux awk, command, length, line, Linux, sort 1 Comment
21 May

Find Duplicate Lines

Sort contents of two files by viewing only duplicate line


sort file1 file2 | uniq -d
admin Posted in Command Line, Linux command, duplicate, line, Linux, sort, uniq 1 Comment
11 May

Sort and Unique

Sort contents of a file and remove repeated lines


sort file.txt | uniq
admin Posted in Command Line, Linux command, file, line, Linux, sort, uniq, unique 1 Comment
01 Feb

Command to Sort Files by Size

Show size of the files and directories sorted by size


du -sk * | sort -rn
admin Posted in Command Line, Linux command, du, files, Linux, size, sort Leave a comment
12 Dec

Sort a File

A Linux command to sort the contests of a file


sort file.ext

[tags][/tags]

admin Posted in Command Line, Linux cli, command, contents, file, Linux, sort Leave a comment

Post navigation

Categories

  • Code
  • Command Line
  • Configuration
  • CSS
  • HTML
  • internet
  • JavaScript
  • Linux
  • Mobile
  • Perl
  • PHP
  • Python
  • Ruby
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Fruitful theme by fruitfulcode Powered by: WordPress
↑