<p dir="ltr">It&#39;s for perfecting  a shell script. Learning is not the right word. </p>
<p dir="ltr">Since it is for perfecting, many suggestions will be there related to shell globbing. Try to incorporate, it&#39;s better that way and might help at some point to avoid ambiguity (shell&#39;s intelligence, which is dependent on how a shell is created or compiled in the first place, is somewhat in question here).<br></p>
<p dir="ltr">It won&#39;t create any performance difference, however, specific shells might behave unexpectedly if this is not taken into consideration.</p>
<p dir="ltr">Try using the script without making any change to script in some random distribution for the same behaviour (maybe freebsd, archlinux, etcetera).<br>
You may or may not feel the need for incorporating those suggestions but that&#39;s how you can check more or less.<br>
Thats what I can think of right now.</p>
<div class="gmail_quote">On Apr 26, 2016 7:02 PM, &quot;曹勇&quot; &lt;<a href="mailto:ycao18@stevens.edu">ycao18@stevens.edu</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I just find <a href="http://www.shellcheck.net" target="_blank">http://www.shellcheck.net</a> is an awesome website for learning shell.<div>But it recommend use double quote for most case when I use ‘$&#39;</div><div><br></div><div><span style="color:rgb(192,192,192);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px;background-color:rgb(0,0,0)">$ shellcheck myscript</span><br style="color:rgb(192,192,192);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px"><span style="color:rgb(192,192,192);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px;background-color:rgb(0,0,0)"> </span><br style="color:rgb(192,192,192);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px"><a style="text-decoration:underline;color:rgb(128,128,255);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px">Line 1:</a><br style="color:rgb(192,192,192);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px"><span style="color:rgb(192,192,192);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px;background-color:rgb(0,0,0)">ssh $EC2_BACKUP_FLAGS_SSH -o StrictHostKeyChecking=no -v ubuntu@$EC2_HOST \</span><br style="color:rgb(192,192,192);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px"><span style="color:rgb(32,255,32);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px">    ^-- <a href="https://github.com/koalaman/shellcheck/wiki/SC2086" style="color:rgb(128,128,255)" target="_blank">SC2086</a>: Double quote to prevent globbing and word splitting.</span><br style="color:rgb(192,192,192);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px"><span style="color:rgb(32,255,32);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px">                                                                ^-- <a href="https://github.com/koalaman/shellcheck/wiki/SC2086" style="color:rgb(128,128,255)" target="_blank">SC2086</a>: Double quote to prevent globbing and word splitting.</span></div><div><span style="color:rgb(32,255,32);font-family:Consolas,&#39;Courier New&#39;,monospace;font-size:13px"><br></span></div><div><font face="Consolas, Courier New, monospace" size="2">We really need use double quote in this case?</font></div></div><br>_______________________________________________<br>
cs615asa mailing list<br>
<a href="mailto:cs615asa@lists.stevens.edu">cs615asa@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs615asa" rel="noreferrer" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs615asa</a><br>
<br></blockquote></div>