]> arthur.barton.de Git - netdata.git/commitdiff
prevent a cat command on each iteration
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 8 Jun 2016 21:54:49 +0000 (00:54 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 8 Jun 2016 21:54:49 +0000 (00:54 +0300)
charts.d/cpufreq.chart.sh

index 008ffe1d7066e5fa6cc9567d86e3b700dc7871ce..23e30dfb32fc2c8d7748f3761d20b4ae6bcea34e 100755 (executable)
@@ -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 $fid = \"\$(< $file )"
        done
        echo >>$TMP_DIR/cpufreq.sh "echo END"