find fibre interfaces using ethtool
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 19 Aug 2022 11:13:08 +0000 (13:13 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 19 Aug 2022 11:13:21 +0000 (13:13 +0200)
net/ip-link-fibre [new file with mode: 0755]

diff --git a/net/ip-link-fibre b/net/ip-link-fibre
new file mode 100755 (executable)
index 0000000..da214a6
--- /dev/null
@@ -0,0 +1 @@
+ip link | grep UP | grep ' e[^ ]*:' | grep -v @ | cut -d: -f2 | xargs -i sh -c 'ethtool {} | grep FIBRE | sed "s/^.*FIBRE.*$/{}/" '