torrent/nushell/examples/ifconfig_tun_find.nu
2024-01-13 13:01:54 +03:00

3 lines
199 B
Plaintext

ifconfig | lines -s | each { |row| (find "tun") } | each { |row| (find "prefixlen") }
| split column --collapse-empty --regex "[% ]" "interface" "mac" "dev" "pl"
| select "dev" "mac"