On Wed, Jul 31, 2019 at 12:31:16PM +0100, Mark Rogers wrote:
On Tue, 30 Jul 2019 at 09:30, Chris Green cl@isbd.net wrote:
My script just lists IP, host name, MAC and manufacturer. If not run as root then it just reports IP and host name.
#!/bin/bash [...]
Thanks Chris.
I used to use awk a lot but it's a couple of decades ago and my memory is rusty, I think I need to get back into it. But my main challenge here is that I want to collate duplicates (so if one MAC is showing multiple IP addresses I want to list them together). Is this something that awk is suited to, or am I better of using python?
Could you simply pipe the output into 'sort' with parameters to sort on the MAC field of your output?