iftop -t -L1 -s1
Output:
iftop -t -L1 -s1 | grep "Total send and receive rate:"
Output:
How can I grep just the "Total send and receive state:" line?
It seems that iftop
is writing the unwanted lines to STDERR
. To remove those for your grep
use a command line as follows.
iftop -t -L1 -s1 2> /dev/null | grep "Total send and receive rate:"