3.2 Searching and Extracting Data from Files Flashcards
Search Extract
append
> >
Search Extract
redirect
>
Search Extract
grep
search in case insensitive
grep -i
Search Extract
grep
search is recursive - it searches into all files within the given directory and its subdirs
grep -r
Search Extract
grep
the search counts the number of matches
grep -c
Search Extract
grep
inverts the match to print lines that do not match the search term
grep -v
Search Extract
grep
turns on extended regular expressions (needed by some of the more advanced meta-characters
like | , + and ?)
grep -E
Search Extract
regular expression
matches any single character (except newline)
.
Search Extract
regular expression
match any one character within brackets
[abcABC]
Search Extract
regular expression
match any one character except the ones in brackets
[^abcABC]
Search Extract
regular expression
match any character in the range
[a-z]
Search Extract
regular expression
match any one character except the ones in range
[^a-z]
Search Extract
regular expression
start of line
Search Extract
regular expression
End of line
$
Search Extract
regular expression meta characters
zero or more of the preceeding pattern
*