10 lines
240 B
Python
10 lines
240 B
Python
|
#!/usr/bin/python3
|
||
|
import sys,re
|
||
|
|
||
|
way=sys.argv[1]
|
||
|
for line in sys.stdin:
|
||
|
res = re.match(r".*Packet (\d+) latency (\d+)µs with flag (\d+).*", line)
|
||
|
if not res: continue
|
||
|
pid,lat,flag = res.groups()
|
||
|
print(f"{pid},{lat},{flag},{way}")
|