I've been trying to figure out how to find how many values in a column which are not present i.e. has just a "."
For example
car.txt
Car Colour mpg Year
vw_golf blue 56 2006
vw_polo red 66 2010
honda_civic white . 2007
ford_ka red . 2014
So the ones I'm interested in are the honda civic and ford ka as they don't have a number present for the mpg column and I want to find out how many values in the mpg column which doesn't have a value (in this case is 2).
The problem I'm having is the period seems to give errors when I use awk command.
awk '$3 ~ /\./ {count++} END{print count}' file
$3 == "."
(else it will count decimal mpgs like66.3
as well)