How to remove a line based on contents of the first column?

Good day all.

Using basic UNIX/Linux tools, how would you delete a line based on a character found in column 1?

For example, if the CITY name contains an 'a' or 'A', delete the line:

New York City; New York
Los Angeles; California
Chicago; Illinois
Houston; Texas
Philadelphia; Pennsylvania
Phoenix; Arizona

should become:

New York City; New York
Houston; Texas
Phoenix; Arizona

Thanks in advnace,
BRH

awk -F";" '{if($1 !~ /[aA]/){print $0}}' file

Try also

sed '/^[^;]*[aA]/d' file
New York City; New York
Houston; Texas
Phoenix; Arizona

or

grep -v '^[^;]*[aA]' file
Los Angeles; California
Chicago; Illinois
Philadelphia; Pennsylvania

With implicit if and default print:

awk -F";" '$1 !~ /[aA]/' file
1 Like