I have source code (in C) that is formatted, and newlines are added in the middle of function calls. for example, I have
CALL_A( par1, par2, 12345);
and somewhere else I have
CALL_A(par1, par2 ,12345);
I need to find the numbers passed as the 3rd parameter of the function. I used this sed command to remove newlines, but it does not match it:
cat source.c | sed -e ':a; /CALL_A*$/ { N; s/$//; ba; }'
Any suggestions on how to get rid of a newline in the middle of a function call?
source share