<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
John,
<blockquote
cite="mid:35B668A3C92EF848BD77E62CD821281D4DCE375312@AMRXM3123.dir.svc.accenture.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Courier New \;";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Times New Roman \, serif \;";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1348101477;
mso-list-type:hybrid;
mso-list-template-ids:-378371604 -1659441958 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">That
is exactly what I was thinking.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Xymon
version 4.3.0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">In
my script I get the results as follows:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
style="color: rgb(31, 73, 125);"><span style="">-<span
style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span style="color:
rgb(31, 73, 125);">Echo $BBALPHAMSG (everything is fine –
except for formatting which is what I am trying to correct)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
style="color: rgb(31, 73, 125);"><span style="">-<span
style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span style="color:
rgb(31, 73, 125);">Echo “$BBALPHAMSG” >file (message is
written to file and formatting is as I would like but the
“\*” characters are converted as described below)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
style="color: rgb(31, 73, 125);"><span style="">-<span
style="font: 7pt "Times New Roman";">
</span></span></span><!--[endif]--><span style="color:
rgb(31, 73, 125);">Echo $BBALPHAMSG >file (same as above
but message is not formatted)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
</div>
</blockquote>
So it's in a shell script you're writing? Just don't enclose
$BBALPHAMSG in double quotes and you'll be fine.<br>
If it's a BASH script, then the behaviour above is as documented -
see 'man bash' under QUOTING:<br>
<br>
<tt>...<br>
Enclosing characters in double quotes preserves the
literal value of all characters within the quotes,<br>
with the exception of $, ‘, \, and, when history expansion
is enabled, !. The characters $ and ‘ retain<br>
their special meaning within double quotes. The
backslash retains its special meaning only when fol-<br>
lowed by one of the following characters: $, ‘, ", \, or
<newline>. A double quote may be quoted within<br>
double quotes by preceding it with a backslash. If
enabled, history expansion will be performed unless<br>
an ! appearing in double quotes is escaped using a
backslash. The backslash preceding the ! is not<br>
removed.<br>
...<br>
Words of the form $'string' are treated specially. The
word expands to string, with backslash-escaped<br>
characters replaced as specified by the ANSI C standard.
Backslash escape sequences, if present, are<br>
decoded as follows:<br>
\a alert (bell)<br>
\b backspace<br>
\e an escape character<br>
\f form feed<br>
\n new line<br>
\r carriage return<br>
\t horizontal tab<br>
\v vertical tab<br>
\\ backslash<br>
\' single quote<br>
\nnn the eight-bit character whose value is the
octal value nnn (one to three digits)<br>
\xHH the eight-bit character whose value is the
hexadecimal value HH (one or two hex digits)<br>
\cx a control-x character<br>
...<br>
<br>
</tt><br>
David.<br>
<blockquote
cite="mid:35B668A3C92EF848BD77E62CD821281D4DCE375312@AMRXM3123.dir.svc.accenture.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">I
have tried to pipe both of these through sed before sending
to the file but that still isn’t working as the characters
are converted prior to the pipe.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">There
has got to be a way that I can write these to a file but I
am just missing something simple.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Arial","sans-serif";
color: rgb(31, 73, 125);">Thanks,</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif"; color: rgb(31, 73, 125);">
<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;
font-family: "Arial","sans-serif";
color: rgb(31, 73, 125);">John</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif"; color: rgb(31, 73, 125);">
<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-size: 7.5pt;
font-family: "Arial","sans-serif";
color: silver;">_____________________________________________________________________</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif"; color: rgb(31, 73, 125);">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">John
Rothlisberger<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Senior
Analyst <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Application
& Technology Integration <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Implementation
& Managed Services for Business Process Outsourcing<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">IT
Strategy, Infrastructure & Security - Technology
Growth Platform<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Accenture<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">312.693.3136 office<b><o:p></o:p></b></span></p>
<p class="MsoNormal"><span style="font-size: 7.5pt;
font-family: "Arial","sans-serif";
color: silver;">_____________________________________________________________________</span><span
style="color: rgb(31, 73, 125);"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<div>
<div style="border-right: medium none; border-width: 1pt
medium medium; border-style: solid none none; border-color:
rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;
padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;
font-family:
"Tahoma","sans-serif"; color:
windowtext;">From:</span></b><span style="font-size:
10pt; font-family:
"Tahoma","sans-serif"; color:
windowtext;"> David Baldwin
[<a class="moz-txt-link-freetext" href="mailto:david.baldwin@ausport.gov.au">mailto:david.baldwin@ausport.gov.au</a>] <br>
<b>Sent:</b> Wednesday, July 27, 2011 5:10 PM<br>
<b>To:</b> Rothlisberger, John R.<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
<b>Subject:</b> Re: [Xymon] Corrupted data in
BBALPHAMSG?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">John,<br>
<br>
The "corrupted characters" you are seeing are the ASCII
characters corresponding to the number after the \ character.
e.g. \4 -> ^D, \44 -> $, etc. It looks like the string
is being passed to something like a string formatting function
(e.g. sprintf) without being properly quoted to escape '\'
characters.<br>
<br>
What version of Xymon are you using?<br>
<br>
David.<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">Has anyone noticed what appears to be
corruption in BBALPHAMSG? I have only noticed this behavior
(so far) on disk checks and it always follows the backslash
between the Total Space and Available Space. It also seems to
be consistent from host to host (ex. The host below will have
the same corruption for each disk check other hosts may show
slightly different characters but not all hosts exhibit
errors). <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Within my email script all I am doing is
‘echo “$BBALPHAMSG” >tmpfile’.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Xymon Server: Ubuntu 10.04<o:p></o:p></p>
<p class="MsoNormal">Client (in this instance): W2k3 Server<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">The actual client data appears to be just
as expected with no odd characters (this is pulled from the
“Client data” link on the Xymon page):<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">[disk]</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">Filesystem 1K-blocks Used Avail
Capacity Mounted Summary(Total\Avail)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">C 20241899 11256291
8985608 55% /FIXED/C 19.31gb\8.58gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">D 856979392 641409136
215570256 74% /FIXED/D 817.28gb\205.59gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">F 179205040 54697624
124507416 30% /FIXED/F 170.92gb\118.75gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">G 179205072 174737304
4467768 97% /FIXED/G 170.92gb\4.26gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">H 179205072 174778264
4426808 97% /FIXED/H 170.92gb\4.22gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">I 176064364 129088448
46975916 73% /FIXED/I 167.92gb\44.81gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">J 1756490840 41785572
1714705268 2% /FIXED/J 1.65tb\1.61tb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";">O 976771068 95844
976675224 0% /FIXED/O 931.53gb\931.44gb</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">But then when I use BBALPHAMSG within an
email script there can be odd corruption:<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">yellow Wed Jul 27 09:24:50 2011
- Filesystems NOT ok</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">&yellow G (97% used) has
reached the WARNING level (97%)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">&yellow H (97% used) has
reached the WARNING level (97%)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">Filesystem 1K-blocks
Used Avail Capacity Mounted
Summary(Total\Avail)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">C 20241899
11256291 8985608 55% /FIXED/C
19.31gb\8.58gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">D 856979392
641409136 215570256 74% /FIXED/D 817.28gb<span
style="background: none repeat scroll 0% 0% yellow;"><85></span>.59gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">F 179205040
54697624 124507416 30% /FIXED/F 170.92gb
<span style="background: none repeat scroll 0% 0% yellow;">8</span>.75gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">G 179205072
174737304 4467768 97% /FIXED/G 170.92gb<span
style="background: none repeat scroll 0% 0% yellow;">^D</span>.26gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">H 179205072
174778264 4426808 97% /FIXED/H 170.92gb<span
style="background: none repeat scroll 0% 0% yellow;">^D</span>.22gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">I 176064364
129088448 46975916 73% /FIXED/I 167.92gb<span
style="background: none repeat scroll 0% 0% yellow;">$</span>.81gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">J 1756490840
41785572 1714705268 2% /FIXED/J 1.65tb<span
style="background: none repeat scroll 0% 0% yellow;">^A</span>.61tb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">O 976771068
95844 976675224 0% /FIXED/O
931.53gb\931.44gb</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier New
;","serif";">See <a moz-do-not-send="true"
href="http://xymonserver/xymon-cgi/svcstatus.sh?HOST=ServerA&SERVICE=disk">http://xymonserver/xymon-cgi/svcstatus.sh?HOST=ServerA&SERVICE=disk</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family:
"Arial","sans-serif";">Thanks,</span><span
style="font-size: 12pt; font-family: "Times New Roman ,
serif ;","serif";"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family:
"Arial","sans-serif";">John</span><span
style="font-size: 12pt; font-family: "Times New Roman ,
serif ;","serif";"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size: 7.5pt; font-family:
"Arial","sans-serif"; color: silver;">_____________________________________________________________________</span><span
style="font-size: 12pt; font-family: "Times New Roman ,
serif ;","serif";"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">John
Rothlisberger</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Senior
Analyst </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Application
& Technology Integration </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Implementation
& Managed Services for Business Process Outsourcing</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">IT
Strategy, Infrastructure & Security - Technology Growth
Platform</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Accenture</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">312.693.3136 office</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size: 7.5pt; font-family:
"Arial","sans-serif"; color: silver;">_____________________________________________________________________</span>
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size: 12pt; font-family:
"Times New Roman","serif";"><o:p> </o:p></span></p>
<div class="MsoNormal" style="text-align: center;"
align="center"><span style="font-size: 12pt; font-family:
"Times New Roman","serif";">
<hr align="center" size="2" width="100%"></span></div>
<p class="MsoNormal"><span style="font-size: 10pt; font-family:
"Arial","sans-serif"; color: gray;">This
message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.
If you have received it in error, please notify the sender
immediately and delete the original. Any other use of the
email by you is prohibited.</span><span style="font-size:
12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; font-family:
"Times New Roman","serif";"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre>David Baldwin - Assistant Director, Infrastructure (acting)<o:p></o:p></pre>
<pre>Information and Communication Technology Services<o:p></o:p></pre>
<pre>Australian Sports Commission <a moz-do-not-send="true" href="http://ausport.gov.au">http://ausport.gov.au</a><o:p></o:p></pre>
<pre>Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a> Leverrier Street Bruce ACT 2617<o:p></o:p></pre>
<p class="MsoNormal"><span style="font-size: 12pt; font-family:
"Times New Roman","serif";"><o:p> </o:p></span></p>
<div class="MsoNormal" style="text-align: center;"
align="center"><span style="font-size: 12pt; font-family:
"Times New Roman","serif";">
<hr align="center" size="2" width="100%"></span></div>
<p class="MsoNormal"><span style="font-size: 12pt; font-family:
"Times New Roman","serif";">Keep up to
date with what's happening in Australian sport visit <a
moz-do-not-send="true" href="http://www.ausport.gov.au">www.ausport.gov.au</a>
<br>
<br>
</span><span style="font-size: 7.5pt; font-family:
"Arial","sans-serif";">This message is
intended for the addressee named and may contain
confidential and privileged information. If you are not the
intended recipient please note that any form of
distribution, copying or use of this communication or the
information in it is strictly prohibited and may be
unlawful. If you receive this message in error, please
delete it and notify the sender.</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <o:p></o:p></span></p>
<div class="MsoNormal" style="text-align: center;"
align="center"><span style="font-size: 12pt; font-family:
"Times New Roman","serif";">
<hr align="center" size="2" width="100%"></span></div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
David Baldwin - Assistant Director, Infrastructure (acting)
Information and Communication Technology Services
Australian Sports Commission <a class="moz-txt-link-freetext" href="http://ausport.gov.au">http://ausport.gov.au</a>
Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616
<a class="moz-txt-link-abbreviated" href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a> Leverrier Street Bruce ACT 2617
</pre>
</body>
</html>