I'm working on a script to wake different LCs on my LAN. MAC-Adresses are hard to memorize so I made myself a list that contains information about the respective PCs. Right now the list looks like:
dragoner xxx.xxx.xxx.xxx xx:xx:xx:xx:xx:xx
theseus yyy.yyy.yyy.yyy yy:yy:yy:yy:yy:yy
...
That means, that new entries will always have to be in the form: netbios-name ipv4 mac
. The advantage is, that such a list can easily be queried by grep
and awk
.
I'd rather like to have a list like that:
netbios=dragoner ip4=xxx.xxx.xxx.xxx mac=xx:xx:xx:xx:xx:xx
netbios=theseus mac=yy:yy:yy:yy:yy:yy ip4=yyy.yyy.yyy.yyy
...
In that manner new information could be added more easily and row wouldn't have to have a certain number of columns... but I'm failing to query it via awk.