1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Fix multiple shellcheck issues

This commit is contained in:
Lars Kruse 2019-08-13 03:59:54 +02:00
parent 5b1099fb83
commit 7fed3b9765
18 changed files with 59 additions and 50 deletions

View file

@ -76,7 +76,7 @@ EOF
else
for CAT in ${CATEGORIES}; do
CATFIELD=$(clean_fieldname "${CAT}")
CATDATA=$(echo "${OUT}" | sed -n "s#${CAT} \+##p")
CATDATA=$(echo "${OUT}" | sed -n 's#'"${CAT}"' \+##p')
echo "${CATFIELD}.value $(echo "${CATDATA}" | wc -l)"
echo "${CATFIELD}.extinfo $(echo "${CATDATA}" | tr '\n' ' ')"
done

View file

@ -169,7 +169,7 @@ case "${MODE}" in
esac
# Reformat the output of the cut|sort|uniq... to a more human-friendly "item (count)" format
CVECOUNTRE="s/^ *\([0-9]\+\) \+\([^ ]\+\)/\2 (\1)/"
CVECOUNTRE='s/^ *\([0-9]\+\) \+\([^ ]\+\)/\2 (\1)/'
# shellcheck disable=SC2005 disable=SC2046
# The nested $(echo ...)s are needed to yet the newlines