Awk
Awk is text-processing utility.
The name of AWK is derived from the surnames of its authors: Alfred Aho, Peter Weinberger, and Brian Kernighan.
Print Lines Containing tom, jerry AND vivek
awk '/tom|jerry|vivek/' /etc/passwd
Specify : as seperator
awk -F: '{print $1}' /etc/passwd
use of printf
awk '{printf "%s ",$2}' file
Command line on bash
awk '
BEGIN { actions }
/pattern/ { actions }
/pattern/ { actions }
……….
END { actions }
' filenames
Execute a awk script
awk -f mypgoram.awk input.txt
#### Process and print
echo 4000000 | awk '{print $1*10^-6 " Wh"}'