Tag: grep examples

grep show lines before and after

Usually when searching for keywords, we need to look at the keyword context information, all of which use -A, -B and -C parameters. Show num...

linux grep regex example

grep regular expression example; - grep -E "^1" test.txt; - grep "[d3]$" test.txt; - grep -E "^[12]" test.txt; - grep "1..3" test.txt; -...