1
I have the following awk command
awk '{if ( $2 == "x.name" ) {print "OK"} else {print "NOT OK" } }'
but $2 could be x.name or x-name or x:name
how to change the following awk in order to Support all rules (x.name or x-name or x:name)
1
I have the following awk command
awk '{if ( $2 == "x.name" ) {print "OK"} else {print "NOT OK" } }'
but $2 could be x.name or x-name or x:name
how to change the following awk in order to Support all rules (x.name or x-name or x:name)
2
awk '{if ( $2 ~ /x[-.:]name/ ) {print "OK"} else {print "NOT OK" } }'