nuscripts/examples/ifconfig_tun_find.nu

3 lines
199 B
Plaintext
Raw Normal View History

2024-01-13 10:50:06 +00:00
ifconfig | lines -s | each { |row| (find "tun") } | each { |row| (find "prefixlen") }
| split column --collapse-empty --regex "[% ]" "interface" "mac" "dev" "pl"
| select "dev" "mac"