-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands
12 lines (8 loc) · 994 Bytes
/
commands
1
2
3
4
5
6
7
8
9
10
11
12
# generate temperature files with only the Package temperatures
find raw/ -type f -name '*.temp' | while read -r FN; do grep ^Pack "$FN" | sed 's/^Package id 0: *+//; s/°C .*$//' > "package-temperatures/$( printf "%s" "$FN" | sed 's|^raw/\(.*\)/\([[:digit:]][[:digit:]]*__\)\(.*\)\.temp$|\2\1/\3|; s|/|_|g' )"; done
# insert filename as first line for gnuplot
find package-temperatures/ -maxdepth 1 -type f -printf '%f\n' | while read -r FN; do TITLE="$( printf '%s' "$FN" )"; sed -i "1 i\\$TITLE" "package-temperatures/$FN" ; done
# plot data with wildcards
gnuplot -p -e 'set key autotitle columnhead; filelist=system("ls *gnome-shell-classic_verifyxattr-data.warmup+main"); plot for [filename in filelist] filename with lines'
# plot as svg with white background
gnuplot -p -e 'set key autotitle columnhead; filelist=system("ls *gnome-shell-classic_verifyxattr-data.warmup+main"); set terminal svg enhanced background rgb "white"; plot for [filename in filelist] filename with lines'