I want handle strings of the form:
PREFIX_TYPE_N,DATA
So, does the *awk (gawk, mawk, nawk) support including pattern matching in the action for already matched string? Something like this (of course, doesn't work for me):
*awk 'BEGIN { FS="," }
/PREFIX/ {
/TYPE_1/ {printf "[TYPE1] [DATA: $2]"} // <-- included pattern
/TYPE_2/ {printf "[TYPE2] [DATA: $2]"} // <-- another included pattern
... // <-- some more included patterns
}' "filename"
Or do I still need if/else or switch/case?