sort - sorts file[s].
Takes list of file-names for input. But piping and redirection also work.

Sends results to screen. So piping or redirection are required.

Do NOT use same file-name for input and output. Date will be destroyed.

sort ofile > newfile

Some Options :


uniq - eliminate consecutive duplicate lines.
# use sort -u to eliminate all duplication.

Some Options :



tr - translate. Takes standard input and sends to standard output>
# So redirection and piping required in most cases.

  • tr takes two lists, the search list and the replacement list.
  • It does a one to one match on the lists. So lists should be same length.
  • It does support ranges.
  • It does support the regex symbolic ranges. cat data | tr "12345" "ABCDE"cat data | tr "a-z" "A-Z"cat data | tr ":lower:" ":upper:". Some options : ul - underlining. Translates underlines in a document to the appropriate character for the terminal being used. If underling not possible, it will strip it from document. Useful for cleaning up man-pages for printing. man man | ul -t dumb > man.txt