awk ‘/lease/{IP=$2} /ethernet/{MAC=$3} /hostname/ {HOST=substr($2,2,length($2)-3); printf(“%s – %s – %s \n”,IP,HOST,MAC)}’ < /var/lib/dhcp/dhcpd.leases |sort |uniq
tecnologia e finanças
awk ‘/lease/{IP=$2} /ethernet/{MAC=$3} /hostname/ {HOST=substr($2,2,length($2)-3); printf(“%s – %s – %s \n”,IP,HOST,MAC)}’ < /var/lib/dhcp/dhcpd.leases |sort |uniq