summaryrefslogtreecommitdiffstats
path: root/misc-utils/getopt-parse.bash
diff options
context:
space:
mode:
authorSami Kerola2015-06-12 21:57:31 +0200
committerKarel Zak2015-06-29 12:06:12 +0200
commit694562e3b875688af35d9cddb85c2c89658f3c2c (patch)
tree217991edc22c31852bf8b22c61c35a37616fa0a0 /misc-utils/getopt-parse.bash
parentdocs: unify mkswap(8) with swapon(8) about holes warning (diff)
downloadkernel-qcow2-util-linux-694562e3b875688af35d9cddb85c2c89658f3c2c.tar.gz
kernel-qcow2-util-linux-694562e3b875688af35d9cddb85c2c89658f3c2c.tar.xz
kernel-qcow2-util-linux-694562e3b875688af35d9cddb85c2c89658f3c2c.zip
getopt: use $(...) command substitution in example script [shellcheck]
Reference: https://github.com/koalaman/shellcheck/wiki/SC2006 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/getopt-parse.bash')
-rw-r--r--misc-utils/getopt-parse.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc-utils/getopt-parse.bash b/misc-utils/getopt-parse.bash
index 29e7f6fa9..aab8c6238 100644
--- a/misc-utils/getopt-parse.bash
+++ b/misc-utils/getopt-parse.bash
@@ -19,8 +19,8 @@
# Note that we use `"$@"' to let each command-line parameter expand to a
# separate word. The quotes around `$@' are essential!
# We need TEMP as the `eval set --' would nuke the return value of getopt.
-TEMP=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
- -n 'example.bash' -- "$@"`
+TEMP=$(getopt -o ab:c:: --long a-long,b-long:,c-long:: \
+ -n 'example.bash' -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi