Friday, September 14, 2018

AWK - Just Examples with Explanations

Example 1


/ERROR/ { if ($0 !~ /notThisOne/) print NR $0 }


This script prints all lines with the word ERROR but without a word notThisOne.  The original line number is printed in front of each line printed.