Révision adc00722
systemd_units: avoid use of echo -n flag
| 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