If you don't do a search pattern or could go line by line and for each line it performs operations described
in main org section if your search pattern org will perform operations described in the main section
only four lines where pattern was found.
Firstly let's check our team though.
Now let's say did we want to display only Peter name and his unit.
So in our program we will start with search pattern which is a required expression which is typed between
two slushes
so we can type.
Peter and if all Gavilan found line containing what Peter Weaver display name and unit so do I assign
one and dollar signs we
if you push enter we see Peter the Great now let's print.
All people working for I-T department.
But here we see offsider because unit has I-T in its name.
So we need to change search pattern and it will be done by adding up before I-T.
This will work only if you stop separating fields in our table and yes we can see only people working
for either the unit or by default is using basic regular expressions which means that some special characters
needs to be used with backslash in order to not lost its special meaning how to print all records without
the header.
It is by using exclamation mark before search and pattern which describe had so in our case the verb
name can describe header so we will put exclamation mark before searching.
But then
and great works perfectly.
We don't see the heede but still can happen.
Did divert name will be present somewhere else.
So far being sure we can tell don't print the line which starts a it name and the result is the same.
Now let's print only the guys with our display first line do Hegner we can do that as previously using
search pattern Dopp I-T.
Or we can use output of previous awk command as an input to another awk program where we will check
for I-T and will display on line the design zero
and we see Peter and John only grade if you want to display lines.
Her name is Peter.
We can use another option.
So just all die inside single quotation marks of awk.
C'mon dot assign one
double equals sign.
Peter and awk will go line by line and read the first field is equal to Peter.
This line will be printed
similarly.
We can ask to display all the lines where first field is not equal to string name
great.
We see output without the header.