2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

systemd_units: avoid use of echo -n flag

This commit is contained in:
Tomaz Solc 2016-10-27 17:52:30 +02:00
parent a9476f50fd
commit adc0072286

View File

@ -62,8 +62,8 @@ EOF
fetch () {
tmp=$(systemctl --no-pager --no-legend --all | awk '{print $1, $3}')
for state in $states ; do
echo -n "$state.value "
echo "$tmp" | grep -c "$state$"
count=$(echo "$tmp" | grep -c "$state$")
echo "$state.value $count"
extinfo=$(echo "$tmp" | grep "$state$" | cut -d " " -f 1)
if [ -n "$extinfo" ]; then
echo "$state.extinfo" $extinfo