Ultra-crude solution:
Code:
[mherring@Ath ~]$ a=20100301201003300000000000
[mherring@Ath ~]$ echo $a|sed -r 's/(.{14})../\199/'
Matches the first 16 characacters on the line--replaces 1-14 in kind, and then inserts "99" for #15 and #16.
Same thing, but inserting from a variable:
Code:
[mherring@Ath ~]$ b=99
[mherring@Ath ~]$ echo $a|sed -r "s/(.{14})../\1$b/"
20100301201003990000000000
Note that the SED command string now has to be in double-quotes.