TEST 1 Flashcards

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

What do these signs replace?
*, ?, [characters]

A
  • = any patters
    ? = a single character
    [characters] = any character within the brackets
    ex: [a-d] = [abcd]
    ![a-d] = anything not in the bracket
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the grep function do?
What do the following flags mean?
i, c, v, n, l

A

grep ‘STRING’ FILE_NAME

searches for occurences of the string in the file

i = ignore case
c = report count of # lines containing matches
v = invert search (display lines that do not match
n = line number + line on which match was found
l = list file names (not lines) in which match

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

What does ^ symbol mean?

A

Starts with

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

What does $ symbol mean?

A

Ends with

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

When do we use \?

A

When use a special character and don’t want it to be interpreted as a string, want it to have its function

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