I have a UNIX script that has nawk block inside it (This is just a part of the UNIX and NAWK script. It has many more logic and the below code should definitely be in nawk) This
Obviously an issue with quoting. Pass the value to nawk using the -v option.
-v
Instead of
nawk '{ COUNTRY_NAME = "COTE D'IVOIRE" if (COUNTRY_NAME != " "){ ...
Use
nawk -v "COUNTRY_NAME=COTE D'IVOIRE" '{ if (COUNTRY_NAME != " "){ ...