linux

grep: search for specific terms in a file

#usage

Now awk and sed are completly different than grep. awk and sed are text processors. Not only do they have the ability to find what you are looking for in text, they have the ability to remove, add and modify the text as well (and much more).

awk is mostly used for data extraction and reporting. sed is a stream editor
Each one of them has its own functionality and specialties.

Example
Sed

# this will replace any occurrence of the characters ‘cat’ by ‘dog’
Awk

# this will print the second column of file.txt
Basic awk usage: