Accompanying notes:
grep filtering
SED fetch line
awk fetching columns
1. grep
grep Lookup
grep-v Filter Finder
Syntax: grep content parameter line number file
-a displays matching rows and preceding rows
grep 30-a 1.txt Display 30 front 10 lines
-B displays matching rows and subsequent rows
grep 30-b 1.txt
-C Displays matching rows and displays the number of rows before and after matching
grep 30-c 1.txt
-I is case insensitive
-E Filter Multiple strings
-O output exact matching characters instead of the default entire line
2. Sed
SED replacement
Sed-i ' s# original character # destination character #g ' file name
Sed-i ' S#boy#girl#g ' test.txt
SED output
Sed-i '/character/p ' Find matching line output
Sed-i '/character/d ' Delete matching line output
3. awk
awk ' {print $n} ' output column n represents a column
The Three Musketeers of Linux