Low Orbit Flux Logo 2 D

AWK How To Ignore Case

Ignoring case is easy when you’re using AWK for string matching.

Just set the IGNORECASE variable to 1 and you should be all set. In this example we match the string “abc” in either uppercase or lowercase.


awk 'BEGIN {IGNORECASE = 1}/abc/{print}' data.txt 

The output might look like this:


abc xyz edw abc
ABC XYZ EDW ABC