We are using a script which it returns as a result the following
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><consultaDeudaResponse xmlns="http://www.example.org/webServicesvc-schema-services"><estado>120007</estado><mensaje>CONSULTA DE DEUDA CORRECTA.</mensaje><deudas><deuda><N>0</nisRad><secNis>1</secNis><nombre>TEST</nombre></env:Envelope>
I'm trying to get from awk the phrase that says CONSULTA DE DEUDA CORRECTA, as you can see everything is in just one line, no spaces or comma. So I got no idea how to get that phrase and set it up in a variable.
I used
const=$(awk '/CONSULTA DE DEUDA CORRECTA/ ' output)
and
const=$(awk '/^CONSULTA DE DEUDA CORRECTA/ ' output)
But either the whole phrase comes together with the rest of the info I dont need, or the variable is empty.
Any help appreciated.