I'm trying to replace "," only when it occurs between 65510 and "i":
2001::/32,fd00::230:5,0,100,0,65510,6939,i
2001:200:900::/40,fd00::230:5,0,100,0,65510,6939,2516,7660,7660,7660,i
So the desired output is:
2001::/32,fd00::230:5,0,100,0,65510_6939,i
2001:200:900::/40,fd00::230:5,0,100,0,65510_6939_2516_7660_7660_7660,i
I've tried the following:
sed -e 's/,\([^65510]*\)i/_\1i/' input-file.txt
But the output only replace the last ",":
2001::/32,fd00::230:5,0,100,0,65510,6939_i
2001:200:900::/40,fd00::230:5,0,100,0,65510,6939,2516,7660,7660,7660_i
