On 2019-07-16 13:07, Leif Lindholm wrote: > + 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/'`
Here and in other places, we should probably use $(...) instead of `...` . >From http://mywiki.wooledge.org/BashFAQ/082 : " `...` is the legacy syntax required by only the very oldest of non-POSIX-compatible bourne-shells. There are several reasons to always prefer the $(...) syntax..." And https://wiki.bash-hackers.org/scripting/obsolete "Both the |`COMMANDS`| and |$(COMMANDS)| syntaxes are specified by POSIX, but the latter is _greatly_ preferred, though the former is unfortunately still very prevalent in scripts." -- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43817): https://edk2.groups.io/g/devel/message/43817 Mute This Topic: https://groups.io/mt/32495132/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-