#!/usr/bin/nawk -f BEGIN { file="/export/oracle/scripts/oper_ult_min.txt" if (ARGC == 2) {hoy=ARGV[1]} else {"date +%Y%m%d" | getline hoy; } while ((getline < file) > 0) { if ($0 ~ "^"hoy) { split($0,cad,";"); sum_vpm+=cad[2]; sum_tventa+=cad[3]; sum_tsia+=cad[4]; hora=substr(cad[1],9,2); min=substr(cad[1],11,2); hhmm=hora":"min; a_vpm[hora]+=cad[2]; a_tventa[hora]+=cad[3]; a_tsia[hora]+=cad[4]; a_tsermepa[hora]=a_tventa[hora]-a_tsia[hora]; a_count[hora]+=1; count+=1; if (mayor_vpm[hora]