Can anyone help, bit of a noob to awk so strugling here
This is a netbackup command that produces an output with many fields, we ignore the first 3 lines, I'm trying to ignore field $12 of "ABC" "DEF" "GHI" and produce a count but in the case of DEF I also need to ignore anything that starts with A on $1 so need $1 !~/A/ but not sure how to combine them together, if I just add $1 !~/A/ in it excludes everything that starts with A
vmquery -w -a |awk 'NR>3 && $12!="ABC" && $12!="DEF" && $12!="GHI" {n++}; END {print n+0}'
This is a netbackup command that produces an output with many fields, we ignore the first 3 lines, I'm trying to ignore field $12 of "ABC" "DEF" "GHI" and produce a count but in the case of DEF I also need to ignore anything that starts with A on $1 so need $1 !~/A/ but not sure how to combine them together, if I just add $1 !~/A/ in it excludes everything that starts with A
vmquery -w -a |awk 'NR>3 && $12!="ABC" && $12!="DEF" && $12!="GHI" {n++}; END {print n+0}'