I have a list of random memory addresses saved in a text file, and I need to sed them out, decode them, and save them back to my file. However, the decoding operation I'm trying to perform is handled in a C++ program I've created some time ago. The problem I am encountering now is executing the C++ within the sed command; that is, I want to back-reference the part that needs to be decoded and use it as an argument in my C++ program. I have written the following command:
cat $1 | sed -r 's/(0[Xx])([0-9A-Za-z]{1,8})/\1`./convAddrs \2`/g';
before I had the chance to read an answer in this post saying that sed does NOT execute commands. Is it true that sed doesn't allow the execution of commands? If so, assuming the command I've written is a valid sed sequence, how would I write it in perl?