<div dir="ltr">You're obviously omitting something.  How about a more complete picture of your script?<div><br></div><div style>Also, you should be quoting your variable references, and insulating your regular expression:</div>

<div style><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div style><div style><font face="courier new, monospace">FILE="/home/xxxxxxi/xyz.xml"</font></div></div><div style><div style>

<font face="courier new, monospace">OUT=<b style="background-color:rgb(255,153,0)">"</b>$(cat </font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b><font face="courier new, monospace">$FILE</font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b><font face="courier new, monospace">)</font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b></div>

</div><div style><div style><font face="courier new, monospace"><br></font></div></div><div style><div style><font face="courier new, monospace">if do_fetch </font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b><font face="courier new, monospace">$HOSTNAME</font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b><font face="courier new, monospace"> </font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b><font face="courier new, monospace">$IP</font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b><font face="courier new, monospace"> | grep -v <b style="background-color:rgb(255,153,0)">-e</b> "$REGEX" > /dev/null ; then</font></div>

</div><div style><div style><font face="courier new, monospace">             COL=green</font></div></div><div style><div style><font face="courier new, monospace">            MSG=</font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b><font face="courier new, monospace">${OUT}</font><b style="font-family:'courier new',monospace;background-color:rgb(255,153,0)">"</b></div>

</div><div style><div style><font face="courier new, monospace"><br></font></div></div><div style><div style><font face="courier new, monospace">...</font></div></div><div style><div style><font face="courier new, monospace"><br>

</font></div></div><div style><div style><font face="courier new, monospace"><br></font></div></div><div style><div style><font face="courier new, monospace">$BB $BBDISP "status $HOSTNAME.$TESTNAME $COL `date`</font></div>

</div><div style><div style><font face="courier new, monospace">${MSG}"</font></div></div></blockquote></div><div class="gmail_extra"><br clear="all"><div><div><br></div>-- <div><b>Steve Coile<br></b>Senior Network and Systems Engineer, <a href="http://www.mcclatchyinteractive.com/" target="_blank">McClatchy Interactive</a><div>

<font size="1">Office: 919-861-1247 | Mobile: 919-622-5369 | Fax: 919-861-1300</font></div></div></div>
<br><br><div class="gmail_quote">On Wed, Aug 27, 2014 at 11:52 AM, usa ims via Xymon <span dir="ltr"><<a href="mailto:xymon@xymon.com" target="_blank">xymon@xymon.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br><br>---------- Forwarded message ----------<br>From: usa ims <<a href="mailto:usaims@yahoo.com">usaims@yahoo.com</a>><br>To: <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>Cc: <br>Date: Wed, 27 Aug 2014 08:47:19 -0700<br>

Subject: not printing the whole xml<br>My custom server script is not printing the whole page. It is only printing the values of the tags<br>
<br>
...<br>
<br>
FILE="/home/xxxxxxi/xyz.xml"<br>
OUT=$(cat $FILE)<br>
<br>
if do_fetch $HOSTNAME $IP | grep -v "$REGEX" > /dev/null ; then<br>
             COL=green<br>
            MSG=${OUT}<br>
<br>
...<br>
<br>
<br>
$BB $BBDISP "status $HOSTNAME.$TESTNAME $COL `date`<br>
${MSG}"<br>
<br>
It should be printing:<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>" xmlns:ns1="<a href="http://tlo.com/" target="_blank">http://tlo.com/</a>"><br>


  <SOAP-ENV:Body><br>
    <ns1:xxxxxxxxxh><br>
      <ns1:searchInput><br>
        <ns1:Password>xxx</ns1:Password><br>
        <ns1:Username>xxx</ns1:Username><br>
        <ns1:DPPAPurpose>0</ns1:DPPAPurpose><br>
        <ns1:GLBPurpose>0</ns1:GLBPurpose><br>
        <ns1:NumberOfRecords>50</ns1:NumberOfRecords><br>
        <ns1:StartingRecord>1</ns1:StartingRecord><br>
        <ns1:Version>4</ns1:Version><br>
        <ns1:ShowAddressSummary>1</ns1:ShowAddressSummary><br>
        <ns1:ShowAddressDetails>1</ns1:ShowAddressDetails><br>
        <ns1:ShowAircraft>1</ns1:ShowAircraft><br>
        <ns1:ShowAssociateSummary>1</ns1:ShowAssociateSummary><br>
        <ns1:ShowBankruptcies>1</ns1:ShowBankruptcies><br>
        <ns1:ShowBusinessAssociations>1</ns1:ShowBusinessAssociations><br>
<br>
But it is printing:<br>
xxx<br>
      xxx<br>
        0<br>
        0<br>
        50<br>
        1<br>
        4<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
<br>
Any help will be greatly appreciated!<br>
<br></blockquote></div><br></div>