I am trying to replace a block in a file using sed, but with no success.
E.g. I want to replace this:
for(int i = 0; i < MAX_LOOPS; ++i) {
printf("Hello World!");
}
With this:
int i = 0;
while(i < MAX_LOOPS) {
printf("Hello World!");
++i;
}