Grep

Examples:

# Search blank lines, print line number.
grep -nv ^$ data.list

# Search multiple keywords.
grep -E 'perl|java|python|sql' ./ebooks/*

Linux Manuel:

Synopsis:

    grep [options] PATTERN [FILE...]

Options:

-C NUM
    print NUM lines of output context.
    
--colour 
    highlight the match part.
    
-i
    ignore case.
    
-L
    only list the name of each file where pattern matched.
    
-n
    Prefix each line of output with the line number within its input file.

-o
    Show only the part of a matching line that matches PATTERN.

-v
    invert the sense of matching, to select non-mating lines.
Homepage
Comments

Hide Comments