grep options Flashcards

1
Q

grep -i

A

ignore case. do not distinguish between upper and lower

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

grep -v

A

invert match, grep prints the lines that do not match the pattern

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

grep -c

A

print the number of matches

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

grep -l

A

print the name of each file, instead of printing each line

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

grep -L

A

prints the name of each file that DOESN’T contain the pattern

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

grep -n

A

prefix each matching line wth the number of the line

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

grep -h

A

for multi-file searches, suppress output of filenames

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