<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 2019-07-16 13:07, Leif Lindholm
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20190716190754.25412-1-leif.lindholm@linaro.org">
<pre class="moz-quote-pre" wrap="">
+ EXECUTABLE=`basename $file`
+ VERSION=`echo $EXECUTABLE | sed 's/[^0-9.]//g'`
+
+ MAJOR=`echo $VERSION | sed 's/\([0-9]*\)\.*.*/\1/'`
+ MINOR=`echo $VERSION | sed 's/[0-9]*\.*\([0-9]*\).*/\1/'`
+ PATCH=`echo $VERSION | sed 's/[0-9]*\.*[0-9]*\.*\([0-9]*\)/\1/'`</pre>
</blockquote>
<p>Here and in other places, we should probably use $(...) instead
of `...` .</p>
<p><br>
</p>
<p>From <a class="moz-txt-link-freetext" href="http://mywiki.wooledge.org/BashFAQ/082">http://mywiki.wooledge.org/BashFAQ/082</a> :</p>
<p><span class="anchor" id="line-3"></span><tt>" `...`</tt> is the
legacy syntax required by only the very oldest of
non-POSIX-compatible bourne-shells. There are several reasons to
always prefer the <tt>$(...)</tt> syntax..." <br>
</p>
<p><br>
</p>
<p>And <a class="moz-txt-link-freetext" href="https://wiki.bash-hackers.org/scripting/obsolete">https://wiki.bash-hackers.org/scripting/obsolete</a></p>
<p>"Both the <code>`COMMANDS`</code> and <code>$(COMMANDS)</code>
syntaxes are specified by POSIX, but the latter is _greatly_
preferred, though the former is unfortunately still very prevalent
in scripts."</p>
<p><br>
</p>
<p>-- <br>
</p>
<p>Rebecca Cran<br>
</p>
</body>
</html>
<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>
You receive all messages sent to this group.
<p>
<a target="_blank" href="https://edk2.groups.io/g/devel/message/43817">View/Reply Online (#43817)</a> |
|
<a target="_blank" href="https://groups.io/mt/32495132/1813853">Mute This Topic</a>
| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>
<br>
<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |
<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>
[edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>