diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2023-02-09 14:02:17 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2023-02-10 17:50:27 +0100 |
commit | cc2293f18ed14f4b306c7e5b92e508a6981b4826 (patch) | |
tree | c7fcecba54667ff035e56a187efe42f66c29a229 /test/lib | |
parent | 30b9d4d4aa7da8dda586fb041b88830bcc2e60de (diff) | |
download | lvm2-cc2293f18ed14f4b306c7e5b92e508a6981b4826.tar.gz |
tests: avoid using length
Use ${# for length instead.
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/utils.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/utils.sh b/test/lib/utils.sh index 1d1ed48bf..ca9f5ec61 100644 --- a/test/lib/utils.sh +++ b/test/lib/utils.sh @@ -87,7 +87,7 @@ mkdtemp() { base_template=$(echo "$template" | sed 's/XX*$//') # Calculate how many X's we've just removed. - nx=$(expr length "$template" - length "$base_template") + nx=$(( ${#template} - ${#base_template} )) err= i=1 |