Given the following code sample:
uint8_t i, in, ni;
i = in = 2; ni = 1;
while (2 == i > ni) in++;
How can I replace i, in, and ni<
> cat foo
uint8_t i, in, ni;
i = in = 2; ni = 1;
while (2 == i > ni) in++;
> perl -p -i -e 's/\bi\b/inni/; s/\bin\b/inin/; s/\bni\b/i/;' foo
> cat foo
uint8_t inni, inin, i;
inni = inin = 2; i = 1;
while (2 == inni > i) inin++;
>
You're welcome to use any other tool supporting regular expressions aside from perl.