-
+ B8CE803DC74070A6BA41B992E99050526777D4E12076268EEE0D47A4051BA343BD3D16E9695438F7E9AB5343DFE6C17773CE018BE63912978E4AD58BB8409297
logotron/logconverters/irssi2tmsr/convert.sh
(0 . 0)(1 . 18)
35 #!/bin/bash
36
37 if [ "$#" -ne 1 ]; then
38 echo "Usage: $0 startIndex"
39 exit 1
40 fi
41
42 awk -v mindex=$1 '/Day changed/ {Month=$5; Day=$6; Year=$7;}
43 /Log opened/ {Month=$5; Day=$6; Year=$10;}
44 ! /-|<--|>/ {count++; sep=";";
45 w= Year " " Month " " Day " " $1 " " $2 " 00";
46 if ($3 == "*") {
47 pp=$3 sep $4 " "; $4=""; n=5;
48 } else {
49 pp=$3 sep; n=4;};
50 $1=""; $2=""; $3="";
51 print count+mindex-1 sep mktime(w) sep pp substr($0,n);
52 }'