You're obviously omitting something. How about a more complete picture of your script?
Also, you should be quoting your variable references, and insulating your regular expression:
FILE="/home/xxxxxxi/xyz.xml" OUT=*"*$(cat *"*$FILE*"*)*"*
if do_fetch *"*$HOSTNAME*"* *"*$IP*"* | grep -v *-e* "$REGEX" > /dev/null ; then COL=green MSG=*"*${OUT}*"*
...
$BB $BBDISP "status $HOSTNAME.$TESTNAME $COL date
${MSG}"
--
*Steve Coile*Senior Network and Systems Engineer, McClatchy Interactive <http://www.mcclatchyinteractive.com/> Office: 919-861-1247 | Mobile: 919-622-5369 | Fax: 919-861-1300
On Wed, Aug 27, 2014 at 11:52 AM, usa ims via Xymon <xymon at xymon.com> wrote:
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
---------- Forwarded message ---------- From: usa ims <usaims at yahoo.com> To: xymon at xymon.com Cc: Date: Wed, 27 Aug 2014 08:47:19 -0700 Subject: not printing the whole xml My custom server script is not printing the whole page. It is only printing the values of the tags
...
FILE="/home/xxxxxxi/xyz.xml" OUT=$(cat $FILE)
if do_fetch $HOSTNAME $IP | grep -v "$REGEX" > /dev/null ; then COL=green MSG=${OUT}
...
$BB $BBDISP "status $HOSTNAME.$TESTNAME $COL
date${MSG}"It should be printing:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tlo.com/"> <SOAP-ENV:Body> <ns1:xxxxxxxxxh> <ns1:searchInput> <ns1:Password>xxx</ns1:Password> <ns1:Username>xxx</ns1:Username> <ns1:DPPAPurpose>0</ns1:DPPAPurpose> <ns1:GLBPurpose>0</ns1:GLBPurpose> <ns1:NumberOfRecords>50</ns1:NumberOfRecords> <ns1:StartingRecord>1</ns1:StartingRecord> <ns1:Version>4</ns1:Version> <ns1:ShowAddressSummary>1</ns1:ShowAddressSummary> <ns1:ShowAddressDetails>1</ns1:ShowAddressDetails> <ns1:ShowAircraft>1</ns1:ShowAircraft> <ns1:ShowAssociateSummary>1</ns1:ShowAssociateSummary> <ns1:ShowBankruptcies>1</ns1:ShowBankruptcies> <ns1:ShowBusinessAssociations>1</ns1:ShowBusinessAssociations>
But it is printing: xxx xxx 0 0 50 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Any help will be greatly appreciated!
participants (1)
-
scoileï¼ mcclatchyinteractive.com