From the Question, Print text between delimiters using sed I am able to get the text between brackets. But when i want to modify, I am finding difficulty. Can somebody, please help me?
simple case:
input:
mutex_lock(rdlock);
output: Here, I want to print the name text between () before and after as below.
printf("locking rdlock");mutex_lock(rdlock);printf("locked rdlock");
complicated case:
input:
mutex_lock(&in->bq[CPORT].lock);
output:
printf("locking &in->bq[CPORT].lock");mutex_lock(&in->bq[CPORT].lock);printf("locked &in->bq[CPORT].lock");
Thanks many in advance.