Unix Grep Master Docs

# Returns the jars containing the missing class.

$ for i in `find $OIM_HOME -name '*.jar'`; do unzip -t $i | grep com/thortech/xl/util/tcUtilityFactoryInternal && echo $i; done 2>/dev/null

# echo after a grep search

$ echo "$(grep -R $id) found in the file"

# show several surrounding lines



grep -B 3 -A 2 foo README.txt

If you want the same number of lines before and after you can use -C num.

Text you want to be red

Your text here