]> arthur.barton.de Git - netdata.git/blobdiff - charts.d/cpufreq.chart.sh
Merge pull request #687 from ktsaou/master
[netdata.git] / charts.d / cpufreq.chart.sh
index 008ffe1d7066e5fa6cc9567d86e3b700dc7871ce..06f692fa691a78308309534f208cd6e001be49b7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+# no need for shebang - this file is loaded from charts.d.plugin
 
 # if this chart is called X.chart.sh, then all functions and global variables
 # must start with X_
@@ -54,7 +54,7 @@ cpufreq_create() {
                echo >&2 "charts.d: cpufreq: on file='$file', dir='$dir', cpu='$cpu', id='$id'"
 
                echo "DIMENSION $id '$id' absolute 1 1000"
-               echo >>$TMP_DIR/cpufreq.sh "printf \"SET $id = \"; cat $file "
+               echo >>$TMP_DIR/cpufreq.sh "echo \"SET $id = \"\$(< $file )"
        done
        echo >>$TMP_DIR/cpufreq.sh "echo END"