This question already has an answer here:
- How to use variables in sed command 1 answer
I have a log file with multiple request XML snippets in it. I am using this sed command to extract and print the request XML:
sed -n '/<GetCompensableProductIdentification*/,/<\/GetCompensableProductIdentification>/p' ProductIdentifierService.log
I want to use variables for the request start and end tags so that I can filter out any request I want. How can I do that?