help with if condition.

Hi,

awk -F"#" '{if ($19~/^1A/) print $0}'

Please explain how "~/^1A/" is working.

Thanks in advance.....:slight_smile:

It is a regular expression that matches the string "1A" at the beginning of field 19.
~ = match operator
^ = beginning of
/ / delimits the regex