I am unable to wrap my head around this issue and hope for your help.
In a bash script I use a curl command which should get data from a server. The curl response is being put into a bash variable, because I want to check the response.
The response looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body><dp:response xmlns:dp="http://www.datapower.com/schemas/management">
<dp:timestamp>2018-02-28T13:31:36+01:00</dp:timestamp>
<dp:result> OK </dp:result>
</dp:response>
</env:Body>
</env:Envelope>
The important part is:
<dp:result> OK </dp:result>
How can I check within my bash script whether this exact string is in the variable (or not)? I tried several approaches with different kind of escapes, however, failed miserably so far (always ending up with an issue with one of the special characters).
Thank you for your help!