Input:
192.168.0.1 aa:bb:cc:00:11:22 192.168.0.1 aa:00:bb:11:cc:22
192.168.10.11 2a:bb:cc:20:11:22 192.168.10.11 aa:02:bb:21:cc:22
Output:
3232235521 187723558162722 3232235521 186920115227682
3232238091 46986071904546 3232238091 186928706210850
I know how to convert mac to int (hex -> int) in python3
: mac = int(mac.replace(':', ''), 16)
But I cant' apply this method in shell. Also don't know about IP to Int.
I want to using awk, like this:
awk '{$1,$3=??, $2,$4=???}' tmpfile > newfile