<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="font-family:Calibri, Arial, Helvetica, sans-serif; font-size:12.0pt; line-height:1.3; color:#1F497D" id="nine_body_n173a1b-fcf2f" class="nine_body" dir="auto">
<div class="nine-pg" dir="auto"><br>
</div>
</div>
<div id="quoted_header_n173a1b-fcf2f" class="quoted_header_editor" dir="auto">
<hr style="border:none; height:1px; color:#E1E1E1; background-color:#E1E1E1;" class="nine-pg">
<div style="border:none; padding:3.0pt 0cm 0cm 0cm" class="nine-pg" dir="auto"><span style="font-size:11.0pt;font-family:Calibri, Arial, Helvetica, sans-serif"><b>From:</b> Greg Woods <greg@gregandeva.net><br>
<b>Sent:</b> Thursday, 30 July 2020 11:20 pm<br>
<b>To:</b> Discussion about MythTV<br>
<b>Subject:</b> Re: [mythtv-users] mythtv XMLTV wiki instructions<br>
</span></div>
</div>
<div id="quoted_body_n173a1b-fcf2f" class="quoted_body_editor mceEditable" dir="auto">
<div class="nine-pg" dir="auto"><br type="attribution">
</div>
<blockquote class="quote nine-pg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="elided-text">
<div dir="ltr">On Wed, Jul 29, 2020 at 7:07 PM Mark Perkins <<a href="mailto:perkins1724@hotmail.com">perkins1724@hotmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-left:1ex">
<div>
<div dir="auto">
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-left:1ex">
<div dir="auto">
<div dir="auto"><br>
</div>
</div>
</blockquote>
<div dir="auto">
<div dir="auto">Interesting. For me:</div>
<div dir="auto">bem echo \$HOME </div>
<div dir="auto"><br>
</div>
<div dir="auto">Is a different result to:</div>
<div dir="auto">bem echo $HOME</div>
<div dir="auto"><br>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>That is because, in the latter case, $HOME is expanded in your current shell, before the command line is executed. When the $ is escaped, as in the first example, then the "$HOME" is expanded  when the echo command is actually executed, in a sudo subshell.</div>
<div><br>
</div>
<div>I would expect the second case to produce the same result as just doing "echo $HOME".</div>
<div><br>
</div>
<div class="nine-pg" dir="auto">
<div class="nine-pg" dir="auto">--Greg</div>
</div>
<div class="nine-pg" dir="auto">
<div class="nine-pg" dir="auto"><br>
</div>
</div>
</div>
</div>
</blockquote>
<div dir="ltr">
<div class="elided-text">
<div class="nine-pg" dir="auto">
<div class="nine-pg" dir="auto">Exactly. I'm puzzled as to how others don't get the expansion in the originating shell in the latter case but as others have said wiki works for them. </div>
</div>
</div>
</div>
<blockquote class="quote nine-pg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote>
</div>
</body>
</html>