grep Flashcards

1
Q

What is the grep syntax?

A

grep {"searched\_string"} {text\_file}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
~~~

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What represents start of a string?

A

^
<br></br>
~~~
^root
~~~

How well did you know this?
1
Not at all
2
3
4
5
Perfectly