# Last edited on 2011-03-22 15:21:37 by stolfi # Explosions in Fukushima reactors # date ! time ! hour ! unit1 ! unit2 ! unit3 ! unit4 ! unit5 ! unit6 2011-03-12 | 15:36 | 39.6 | 1 | 0 | 0 | 0 | 0 | 0 2011-03-13 | 12:33 | 60.5 | 0 | 0 | 1 | 0 | 0 | 0 2011-03-15 | 06:00 | 102.0 | 0 | 0 | 0 | 1 | 0 | 0 2011-03-15 | 06:14 | 102.2 | 0 | 1 | 0 | 0 | 0 | 0 # gawk -v FS='|' '//{ gsub(/[ ]/, "", $0); dt=$1; hr=$2; dtx=(dt " 00 00 00"); gsub(/[\/-]/, " ", dtx); yr=substr(dt,1,4); dy=(yr-2011)*365 + strftime("%j", mktime(dtx)); n=split(hr,hf,":"); ht=hf[1]+(1.0/60.0)*hf[2]; printf "%s | %s | %5.1f", dt, hr, 24*dy+ht - 1680; for (i=4; i<=NF;i++) { printf " | %s", $(i); } printf "\n"; }' | txtable-reformat