4 ms·
For the sake of comparison, here's the corresponding Python one-liner: ping google.com | python -c 'import os,re,sys; [os.system("say %s" % j[0]) for j in
by gvalkov 14y ago
For the sake of comparison, here's the corresponding Python one-liner:
ping google.com | python -c 'import os,re,sys; [os.system("say %s" % j[0]) for j in (re.findall("time=(.*)", i) for i in sys.stdin) if j]'
I'm sure someone can come up with a shorter one-liner, but in general I think Python is simply too verbose for this kind of stuff.