unset file globbing before getting data with nc
paulfantom committed
Jun 7, 2016 at 23:58 UTC
6a5e711816e1803ef8e9fd12afcc766d2d148d4b
1 file changed
+2
charts.d/hddtemp.chart.sh
+2
@@ -41,7 +41,9 @@ hddtemp_count=0
41
hddtemp_update() {
42
# local all=( `nc $hddtemp_host $hddtemp_port | sed -e 's/||/\n/g;s/^|//' | cut -d '|' -f3` )
43
# local all=( `nc $hddtemp_host $hddtemp_port | awk 'BEGIN { FS="|" };{i=4; while (i <= NF) {print $i+0;i+=5;};}'` )
44
+ set -f
45
IFS="|" all=( $(nc $hddtemp_host $hddtemp_port) )
46
+ set +f
47
48
# write the result of the work.
49
echo "BEGIN hddtemp.temperature $1"