Presentation is loading. Please wait.

Presentation is loading. Please wait.

Grep, comm, and uniq. The grep Command The grep command allows a user to search for specific text inside a file. The grep command will find all occurrences.

Similar presentations


Presentation on theme: "Grep, comm, and uniq. The grep Command The grep command allows a user to search for specific text inside a file. The grep command will find all occurrences."— Presentation transcript:

1 grep, comm, and uniq

2 The grep Command The grep command allows a user to search for specific text inside a file. The grep command will find all occurrences of the text string and display the lines in which they occur.

3 Using the grep Command

4 Common grep Expressions

5 The uniq Command Removes duplicate lines from a file It compares only consecutive lines, therefore uniq requires sorted input uniq has an option that allows you to generate output that contains a copy of each line that has a duplicate

6 The comm Command Used to identify duplicate lines in sorted files Unlike uniq, it does not remove duplicates, and it works with two files rather than one It compares lines common to file1 and file2, and produces three column output –Column one contains lines found only in file1 –Column two contains lines found only in file2 –Column three contains lines found in both files


Download ppt "Grep, comm, and uniq. The grep Command The grep command allows a user to search for specific text inside a file. The grep command will find all occurrences."

Similar presentations


Ads by Google