diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-24 22:22:46 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-24 22:22:46 -0400 |
| commit | 2ebc9c2eeaeb03df85f21f6c593e64d3b8218658 (patch) | |
| tree | 5c0ddee0930066de3d44ac207749dd533d8f2766 /csv2graph | |
extracted the plotting tools from csvtools
Diffstat (limited to 'csv2graph')
| -rwxr-xr-x | csv2graph | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/csv2graph b/csv2graph new file mode 100755 index 0000000..8f7d795 --- /dev/null +++ b/csv2graph | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | FILE=$1 | ||
| 4 | |||
| 5 | shift | ||
| 6 | |||
| 7 | if [ ! -f "$FILE" ] ; then | ||
| 8 | echo "Usage: csv2graph <csv file>" | ||
| 9 | fi | ||
| 10 | |||
| 11 | CUM=`mktemp` | ||
| 12 | DIST=`mktemp` | ||
| 13 | OUT=`echo $FILE | sed s/csv/png/` | ||
| 14 | |||
| 15 | analyze -adist -b1000 "$FILE" --csv -n -i $* > $DIST | ||
| 16 | analyze -adist -c -b1000 "$FILE" --csv -n -i $* > $CUM | ||
| 17 | |||
| 18 | if [ -s $CUM ] && [ -s $DIST ]; then | ||
| 19 | plot_dist $DIST $CUM $OUT "$FILE: $*" | ||
| 20 | rm $DIST $CUM | ||
| 21 | else | ||
| 22 | echo "$FILE: Empty." | ||
| 23 | fi | ||
