diff options
author | paulfantom <paulfantom@gmail.com> | 2016-06-07 23:58:13 +0200 |
---|---|---|
committer | paulfantom <paulfantom@gmail.com> | 2016-06-07 23:58:13 +0200 |
commit | 6a5e711816e1803ef8e9fd12afcc766d2d148d4b (patch) | |
tree | 745972db0c9c05110bb4dab5ecb67ad1793f205d /charts.d/hddtemp.chart.sh | |
parent | f9010e60cbe77973f40b2b1fc0b99aea89ea8e24 (diff) |
unset file globbing before getting data with nc
Diffstat (limited to 'charts.d/hddtemp.chart.sh')
-rwxr-xr-x | charts.d/hddtemp.chart.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/charts.d/hddtemp.chart.sh b/charts.d/hddtemp.chart.sh index 3bd8ef8b3a..704ab9d02b 100755 --- a/charts.d/hddtemp.chart.sh +++ b/charts.d/hddtemp.chart.sh @@ -41,7 +41,9 @@ hddtemp_count=0 hddtemp_update() { # local all=( `nc $hddtemp_host $hddtemp_port | sed -e 's/||/\n/g;s/^|//' | cut -d '|' -f3` ) # local all=( `nc $hddtemp_host $hddtemp_port | awk 'BEGIN { FS="|" };{i=4; while (i <= NF) {print $i+0;i+=5;};}'` ) + set -f IFS="|" all=( $(nc $hddtemp_host $hddtemp_port) ) + set +f # write the result of the work. echo "BEGIN hddtemp.temperature $1" |