…^^ grep

grep one text processing tool Three Musketeers

Legend has it that Linux has three swordsman,
all martial arts,
but grep which accounted for a place,
the remaining two are sed, awk;
today, it said the power of grep

The so-called grep:
Global search REgular expression and Print OUT abbreviation of the line
Global search mean
global search
REgular expression mean
regular expressions
so you can use grep is a "regular expression" to "Global Search" tool
of course, regular expressions can not be expressed
only with regular expressions with will be more powerful! !
To try to build a file as follows

…^^ grep

If, from testgrep.txt find the row that contains "test" where the character, use the following command

…^^ grep

Use the grep command to search out a "test" line where the string in the "testgrep.txt" file and print it out

There are many options on grep as shown in Fig.
…^^ grep

In short
a lot of pondering theory to practice more command

        生命不息 学习不止

Guess you like

Origin blog.51cto.com/14451214/2426266