summaryrefslogtreecommitdiff
path: root/scripts/tuxonice_output_to_csv.sh
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-08 01:01:14 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-08 01:01:14 -0300
commite5fd91f1ef340da553f7a79da9540c3db711c937 (patch)
treeb11842027dc6641da63f4bcc524f8678263304a3 /scripts/tuxonice_output_to_csv.sh
parent2a9b0348e685a63d97486f6749622b61e9e3292f (diff)
Linux-libre 4.2-gnu
Diffstat (limited to 'scripts/tuxonice_output_to_csv.sh')
-rw-r--r--scripts/tuxonice_output_to_csv.sh35
1 files changed, 0 insertions, 35 deletions
diff --git a/scripts/tuxonice_output_to_csv.sh b/scripts/tuxonice_output_to_csv.sh
deleted file mode 100644
index b96e6803b..000000000
--- a/scripts/tuxonice_output_to_csv.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-cat $1 | grep "\*TOI\*" | cut -b 22- | sed "s/ /,/g" | sed "s/\.//" | sort -n > $1.tmp
-COLUMNS=$(cat $1.tmp | awk -F ',' ' { print $2 } ' | sort | uniq)
-echo -n "pfn," > $1.tmp2
-for NAME in $COLUMNS; do
- echo -n "$NAME," >> $1.tmp2
-done
-echo >> $1.tmp2
-FIRST=1
-declare -A data
-while IFS=, read -r pfn column value; do
- if [ $FIRST -eq 1 ]; then
- FIRST=0
- LAST_PFN=$pfn
- fi
- if [ $pfn -ne $LAST_PFN ]; then
- echo -n "$LAST_PFN," >> $1.tmp2;
- for NAME in $COLUMNS; do
- echo -n "${data[$NAME]}," >> $1.tmp2
- done
- data=( )
- echo >> $1.tmp2
- LAST_PFN=$pfn
- fi
- if [ -z "$value" ]; then
- data[$column]=X
- else
- data[$column]=$value
- fi
-done < $1.tmp
-mv $1.tmp2 $1.csv
-rm $1.tmp
-LIBREOFFICE=$(which libreoffice)
-[ -n "$LIBREOFFICE" ] && libreoffice $1.csv &