Projet

Général

Profil

Révision adc00722

IDadc00722860487e663915617caeb60c4388e061d
Parent a9476f50
Enfant 38835f7a

Ajouté par Tomaz Solc il y a environ 9 ans

systemd_units: avoid use of echo -n flag

Voir les différences:

plugins/system/systemd_units
62 62
fetch () {
63 63
	tmp=$(systemctl --no-pager --no-legend --all | awk '{print $1, $3}')
64 64
	for state in $states ; do
65
		echo -n "$state.value "
66
		echo "$tmp" | grep -c "$state$"
65
		count=$(echo "$tmp" | grep -c "$state$")
66
		echo "$state.value $count"
67 67
		extinfo=$(echo "$tmp" | grep "$state$" | cut -d " " -f 1)
68 68
		if [ -n "$extinfo" ]; then
69 69
			echo "$state.extinfo" $extinfo

Formats disponibles : Unified diff