I want to store the network data received and data sent information on a variable or in a file.
Using the below command I can grep it and print the line on screen. But I'm not able to store the info in a bash variable.
top -l 0 -n 1 -c d | grep -e '^Networks:'
Is there any better approach?
(on Mac OS X)