cli-scripts/scripts/ifcheck

11 lines
227 B
Bash
Executable File

#!/usr/bin/env bash
iface=$(ip -br -4 -iec -o -c address show dev wlp0s20f3)
if=$(echo $iface|awk '{print $1}')
ifstatus=$(echo $iface|awk '{print $2}')
ifaddr=$(echo $iface|awk '{print $3}')
echo $if $ifstatus $ifaddr
exit