Created
October 29, 2014 14:04
-
-
Save scajanus/85b3fcdf2e2b6675e945 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| { list=( [0-9]*.csv ); head -n 1 "${list[1]}" & tail -q -n +2 "${list[@]}"; } > merged.csv | |
| num=$(echo $(head -n 1 merged.csv | wc -c) - $(head -n 1 merged.csv | tr -d ';' | wc -c) | bc) | |
| echo ${num} | |
| mkdir plots | |
| for i in $(seq 2 $num) | |
| do | |
| name=$(eval "head -n 1 merged.csv | cut -d\";\" -f $i") | |
| echo $name | |
| gnuplot << EOF | |
| set terminal png | |
| set output "plots/$name.png" | |
| set datafile separator ';' | |
| set timefmt "%d.%m.%Y %H:%M:%S" | |
| set xdata time | |
| plot 'merged.csv' u 1:$i w l title columnhead | |
| EOF | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment