From: Thomas Huth <thuth@redhat.com>
To: kvm@vger.kernel.org
Subject: [kvm-unit-tests PATCH] Avoid backticks, use $() instead
Date: Tue, 22 Jun 2021 11:12:37 +0200 [thread overview]
Message-ID: <20210622091237.194410-1-thuth@redhat.com> (raw)
The backticks are considered as bad style these days, e.g. when checking
scripts with https://www.shellcheck.net/ ... let's use the modern $()
syntax instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 2 +-
run_tests.sh | 2 +-
scripts/arch-run.bash | 10 +++++-----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 71aaad4..d21601f 100755
--- a/configure
+++ b/configure
@@ -13,7 +13,7 @@ objcopy=objcopy
objdump=objdump
ar=ar
addr2line=addr2line
-arch=`uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/'`
+arch=$(uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/')
host=$arch
cross_prefix=
endian=""
diff --git a/run_tests.sh b/run_tests.sh
index 65108e7..9f233c5 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -42,7 +42,7 @@ if [ $? -ne 4 ]; then
fi
only_tests=""
-args=`getopt -u -o ag:htj:v -l all,group:,help,tap13,parallel:,verbose -- $*`
+args=$(getopt -u -o ag:htj:v -l all,group:,help,tap13,parallel:,verbose -- $*)
[ $? -ne 0 ] && exit 2;
set -- $args;
while [ $# -gt 0 ]; do
diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 5997e38..9dd963b 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -111,11 +111,11 @@ run_migration ()
return 2
fi
- migsock=`mktemp -u -t mig-helper-socket.XXXXXXXXXX`
- migout1=`mktemp -t mig-helper-stdout1.XXXXXXXXXX`
- qmp1=`mktemp -u -t mig-helper-qmp1.XXXXXXXXXX`
- qmp2=`mktemp -u -t mig-helper-qmp2.XXXXXXXXXX`
- fifo=`mktemp -u -t mig-helper-fifo.XXXXXXXXXX`
+ migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX)
+ migout1=$(mktemp -t mig-helper-stdout1.XXXXXXXXXX)
+ qmp1=$(mktemp -u -t mig-helper-qmp1.XXXXXXXXXX)
+ qmp2=$(mktemp -u -t mig-helper-qmp2.XXXXXXXXXX)
+ fifo=$(mktemp -u -t mig-helper-fifo.XXXXXXXXXX)
qmpout1=/dev/null
qmpout2=/dev/null
--
2.27.0
next reply other threads:[~2021-06-22 9:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 9:12 Thomas Huth [this message]
2021-07-14 20:24 ` [kvm-unit-tests PATCH] Avoid backticks, use $() instead Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210622091237.194410-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.