GenWikiLinux

From birchyHistory
Jump to: navigation, search
Line 3: Line 3:
  
 
== GREP ==
 
== GREP ==
grep [options] "foo" [file(s)]
+
grep [options] "foo" [file(s)]
  
 
*You can omit the quotes if there are no spaces in the search term.
 
*You can omit the quotes if there are no spaces in the search term.
Line 25: Line 25:
 
egrep supports pipes ("or") (= grep -E)
 
egrep supports pipes ("or") (= grep -E)
  
egrep "fruit|bread"  
+
egrep "fruit|bread"  
  
 
fgrep (fast grep, simple text, no RegEXp) (- grep -F)
 
fgrep (fast grep, simple text, no RegEXp) (- grep -F)
Line 31: Line 31:
 
Can pipe the output of another command
 
Can pipe the output of another command
  
ls |grep blah lists all files in the current directory whose names contain the string "blah"
+
ls |grep blah lists all files in the current directory whose names contain the string "blah"

Revision as of 13:38, 12 September 2015

Personal tools
Namespaces

Variants
Actions
Navigation
Tools