diff options
author | paulfantom <paulfantom@gmail.com> | 2016-06-08 00:29:31 +0200 |
---|---|---|
committer | paulfantom <paulfantom@gmail.com> | 2016-06-08 00:29:31 +0200 |
commit | 3b75b49d6a47e1f20d630c857ad89d7322f1599a (patch) | |
tree | cf824da6e961b4a5067a32be35e9bb22fa808100 /charts.d | |
parent | 6a5e711816e1803ef8e9fd12afcc766d2d148d4b (diff) |
reset IFS to previous one
Diffstat (limited to 'charts.d')
-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 704ab9d02b..91bac6cff5 100755 --- a/charts.d/hddtemp.chart.sh +++ b/charts.d/hddtemp.chart.sh @@ -41,9 +41,11 @@ 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;};}'` ) + OLD_IFS=$IFS set -f IFS="|" all=( $(nc $hddtemp_host $hddtemp_port) ) set +f + IFS=$OLD_IFS # write the result of the work. echo "BEGIN hddtemp.temperature $1" |