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…

Linux AWK

AWK is a pattern scanning and processing language. There are several implementations of AWK (mostly in the form of interpreters). AWK has been codified in POSIX. The main implementations in use today are: nawk (“new awk”, an evolution of oawk, the original UNIX implementation), used on *BSD and widely available on Linux; mawk, a fast implementation Read more…