grep Flashcards
1
Q
What is the grep syntax?
A
grep {"searched\_string"} {text\_file}
2
Q
How to count occurances of a string with grep?
A
-c
<br></br>
~~~
[root@prhq-pan-a pan]# grep -c “RX” mp-monitor.log
42
~~~
3
Q
What is a regular expression?
A
sequence of symbols and characters expressing a string or pattern to be matched within a longer text
4
Q
What represents start of a string?
A
^
<br></br>
~~~
^root
~~~