Grep Flashcards
(10 cards)
Q: What is the most common command used to search for information using regular expressions in Linux?
A: grep (short for global regular expression print)
Q: What does the grep command do?
Searches files for patterns of characters using regular expression metacharacters. The command name is short for “global regular expression print.”
Q: What command is used to search using extended regular expressions?
A: egrep or grep -E
Q: What command is used to search without interpreting regular expressions for faster results?
A: fgrep or grep -F
what does the egrep command do?
A variant of the grep command used to search files for patterns, using extended regular expressions.
what dose the fgrep command do?
A variant of the grep command that does not allow the use of regular expressions.
what does the -i option for for grep?
makes it case insensitive
how do search ONLY for a speicife word and no other words?
“(chr space) word (chrspace)”
what does the dot reprsent in the following? grep “t.e”
project 4
any character AND what the command is doing is search for any line that has a word that starts with t and ends in e with any char inbetween in project4
how do you view lines that start with a spefic word or char give the command?
grep “^ (word or phase) “