CPSC 1280 Lecture Notes - Lecture 14: Cpio, Uniq, Delimiter

52 views7 pages

Document Summary

Sorting is the ordering of data in ascending or descending sort sorts lines contained in a group of files alphabetically: $ sort filenames. The sorted output redirection: $ sort input1. txt input2. txt > output. txt, outputs the sorted content of files input1. txt and input2. txt to the file output. txt. Folds lowercase to equivalent uppercase (case-insensitive) place output in file flname checks if file is sorted. $ sort -t: -k 3,3 -k 2,2 shortlist. Uniq utility uniq removes duplicate adjacent lines from a file: $ uniq filename. $ uniq file1 hey hi hey hi uniq is most useful when combined with sort: $ sort filename| uniq. $ cat file1 hey hey hi hey hi hi. There are a number of reasons that you might want to save some files to a secondary storage such as disk or tape: for daily, weekly, or monthly backups, for transport between non-networked unix sites, for posterity (i. e. future generation)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers