I\'m working on some code that performs a ping operation from python and extracts only the latency by using awk. This is currently what I have:
from os import sy
Here is how I store output to a variable.
test=$(ping -c 1 google.com | awk -F"=| " 'NR==2 {print $11}') echo "$test" 34.9