11 lines
210 B
Bash
Executable file
11 lines
210 B
Bash
Executable file
#!/bin/bash
|
|
|
|
type="${1}"
|
|
action="${2}"
|
|
devices=$(nmcli -g DEVICE device)
|
|
|
|
for d in ${devices};do
|
|
if [ "$(nmcli -g GENERAL.TYPE device show ${d})" = "${type}" ];then
|
|
printf 'device: %s\n' "${d}"
|
|
fi
|
|
done
|