gawk - awk: –f awk: ^ invalid char '�' in expression -
hi have following awk program
problem don't know why complains "awk: –f awk: ^ invalid char '�' in expression" when awk -f pdf.awk aodv1.tr
anyone of out there brighter me in area? =)
begin { recvdsize = 0 starttime = 400 stoptime = 0 } { event = $1 time = $265.01 node_id = $29 pkt_size = $8 level = $4 if (level == "agt" && event == "s" && pkt_size >= 512) { if (time < starttime) { starttime = time } } if (level == "agt" && event == "r" && pkt_size >= 512) { if (time > stoptime) { stoptime = time } hdr_size = pkt_size % 512 pkt_size -= hdr_size recvdsize += pkt_size } } end { printf("average throughput[kbps] = %.2f\t\t starttime=%.2f\tstoptime=%.2f\n",(recvdsize/(stoptime-starttime))*(8/1000),starttime,stoptime)
}
didn't error message tell line number? anyway, i'd take close @ line contains
time = $265.01
if you!
Comments
Post a Comment