Grep -E - extended regex -i - ignore case sensitive -v - invert match -c - count -o - only the matching part -q - doesnt print the result, sets the exits status Sed sed s/*replace*/*with*/gi *file* s - replaces x with y g - replaces all (global) i - case insensitive sed y/*replace*/*with*/ *file* y - replace x[i] with y[i] sed /*to_delete*/d d - delete Awk NR - number of current line NF - number of fields on the current ine $0 - whole line $1 - field 1 awk -F '{*code*}' *file* -F -specifie delimitor code: BEGIN {*before*} {*for each line*} END{*after*}