I have a bunch of files that contain strings similar to:
Get<1>(abc)
Get<2>(xyz)
How can I recursively search for all files with the above pattern and remove everything before the first '(' and place a string afterwards?
Desired output:
abc.val()
xyz.val()
abc and xyz can change to anything, and the number between '<' and '>' don't matter.
Edit:
The files extensions are .cc and .h.
The string also always starts with Get.
Get
what we're keying on here?Get<1>(
can be checked. The number can change to anything.Put<1>(something)
? Is it always Get?