WD W3

Work Diaries Winter 2018 W3: Technical
Grep commands allow you to search for text strings in a given file. Follow Bryan’s helpful tutorial below, and post some screenshots from your attempt. How would you explain grep commands & their usefulness to a client who’s never used Linux before?
Tutorial link: Bryan Linux Tutorial

Grep is intersting, I also found a few things about it:

1) How to use grep to search 2 different words:
Use the egrep command as follows:
$ egrep -w ‘word1|word2’ /path/to/file

2) How to count line when words are matched:
The grep can count the number of times that the pattern
has been matched for each file using -c (count) option:
$ grep -c ‘word’ /path/to/file

Pass the -n option to precede each line of output with
the number of the line in the text file from which it was obtained:
$ grep -n ‘root’ /etc/passwd