<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">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 id="gmail-m_6632194745671968169quoted_body_n1739d3-7277a" 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>--Greg</div><div><br></div></div></div>