From 38835f7a62111ebdbc3ea91a47ee2174e7d225f6 Mon Sep 17 00:00:00 2001 From: Tomaz Solc Date: Thu, 27 Oct 2016 17:54:01 +0200 Subject: [PATCH] systemd_units: add doublequote around $extinfo --- plugins/system/systemd_units | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/system/systemd_units b/plugins/system/systemd_units index 0a55adc5..e7f3960f 100755 --- a/plugins/system/systemd_units +++ b/plugins/system/systemd_units @@ -64,9 +64,9 @@ fetch () { for state in $states ; do count=$(echo "$tmp" | grep -c "$state$") echo "$state.value $count" - extinfo=$(echo "$tmp" | grep "$state$" | cut -d " " -f 1) + extinfo=$(echo "$tmp" | grep "$state$" | cut -d " " -f 1 | tr -d '\n') if [ -n "$extinfo" ]; then - echo "$state.extinfo" $extinfo + echo "$state.extinfo" "$extinfo" fi done }