I'm parsing some logs and need to replace a string with a wildcard match with another string, while still maintaining the 'wildcard'.
e.g.
line: blah1 blah2 10.10.20.1 80 blah5 blah6
needs to look like;
line: blah1 blah2 10.10.20.9 81 blah5 blah6
(delimited by space, would prefer not to rip into fields)
where the '1' may be from 1 to 8 in value. I don't want to parse the file EIGHT times to replace possible occurances, and feel that AWK may be just the ticket.
How do you refer to a 'wildcard' match for value as positional in the output condition?
eg s/10.10.20.[1-8] 80/10.10.20.9 8[*]/
I've got the code for SQLS replace substitution (single update), but the db logging is now too expensive.
Your help is much appreciated.