How can I change all strings in the file, which have the pattern: lowercase sequences of letters separated by one underscore and after last sequence are parentheses. I need change it to sequences, which are not separated by underscore and any letter after underscore is changed to uppercase letter?
For example: this_is_my_task() change to thisIsMyTask(). I need to do it with sed.
But the program should not change string like: this_is____my_task(), because there are 4 underscores in a row.
Program should not change these strings: ___this_is_my_task() or, because of there are underscores in the beginning of the first string.
I have tried this: sed -r 's/([a-z]+)_([a-z]+)\(\)/\1\u\2()/' file.c, but this will change it only to this_is_myTask()