Hi I've got a awk script and keep getting the error ^ syntax error. i don't understand where it is, here is the code :
BEGIN {
FS=" "
COUNT=0
}
m = substr($5,4,2)
if ($6 == DAY && m == MONTH)
{
COUNT++
}
END {
print DAY","MONTH
}
here the line i write in my script using the awk file:
cat accident.txt | awk -v DAYS=$j -v MONTH=$i -f count-by-week-and-month.awk > $i.txt