Linux GREP

grep is used to search for PATTERN in each FILE or standard input. PATTERN is, by default, a basic regular expression (BRE). Example: grep -i ‘hello world’ menu.h main.c Usage: grep [OPTION]… PATTERN [FILE]… Regexp selection and interpretation: -E, –extended-regexp PATTERN is an extended regular expression (ERE) -F, –fixed-strings PATTERN Read more…

Linux SED

sed (stream editor) is a Unix utility that parses and transforms text, using a simple, compact programming language. $ sed -i ‘s/cat/dog/’ file.txt # this will replace any occurrence of the characters ‘cat’ by ‘dog’ Usage: sed [OPTION]… {script-only-if-no-other-script} [input-file]… -n, –quiet, –silent suppress automatic printing of pattern space -e Read more…