#!/bin/bash cache_path=~/.cache/.traffic old_rx=$(head -n 1 $cache_path) old_tx=$(tail -1 $cache_path) printf "0\n0\n" > $cache_path NETWORK_INTERFACE=$(ip route get 1.1.1.1 | grep -Po '(?<=dev\s)\w+' | cut -f1 -d ' ') new_rx=`