Testing
cat > vm_parser.awk << 'EOF' { if (match($0, /(VM_[^ ]+?|CreateVM)/)) { task = substr($0, RSTART, RLENGTH) # Clean task name more thoroughly gsub(/_REQ[0-9]+.*/, "", task) gsub(/_VDA[0-9A-Z]+.*/, "", task) gsub(/_is-[^ ,]+.*/, "", task) gsub(/_db-[^ ,]+.*/, "", task) gsub(/_ap-[^ ,]+.*/, "", task) gsub(/_pg.*01c.*/, "", task) # Prevent duplicate processing on same line if (processed[$0]) next processed[$0] = 1 # Get status if (index(tolower($0), "failed") > 0) { ...