TEST 1 Flashcards
1
Q
A
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
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
4
Q
What does ^ symbol mean?
A
Starts with
5
Q
What does $ symbol mean?
A
Ends with
6
Q
A
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