From 4dbba889d204fa7ecbaa0ae45c1076713f5afcd6 Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Sat, 30 Nov 2019 22:45:21 -0800 Subject: [PATCH] bug fixes --- libraries/util.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/util.bash b/libraries/util.bash index c142f45e..39446647 100755 --- a/libraries/util.bash +++ b/libraries/util.bash @@ -8,7 +8,9 @@ function arrayToParameters() { local -r array=("${@}") - printf "'%s' " "${array[@]}" + local -r string="$(printf "'%s '" "${array[@]}")" + + echo "${string:0:${#string} - 1}" } function arrayToString()