Created
May 20, 2020 22:14
-
-
Save epixoip/d9587235ad7951f7691485864f540efa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in /sys/class/net/*; do | |
printf "%-10s Driver: %-10s State: %s\n" \ | |
"$(basename $i)" \ | |
"$(sed -rn 's/DRIVER=(.*)/\1/p' $i/device/uevent 2>/dev/null || echo unknown)" \ | |
"$(cat $i/operstate)" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment