I have a few locations that need the WiFi to be checked daily. Currently when I run my script this is the outcome I get.
The first name corresponds to the first MAC, the first IP and so on. How may I go about re-arranging this file with grep
, awk
or sed
?
Name : WiFi 1
Name : WiFi 2
Name : WiFi 3
Name : WiFi 4
Name : WiFi 5
Name : WiFi 6
Name : WiFi 7
MAC : aa:aa:aa:aa:aa:aa
MAC : bb:bb:bb:bb:bb:bb
MAC : cc:cc:cc:cc:cc:cc
MAC : dd:dd:dd:dd:dd:dd
MAC : ee:ee:ee:ee:ee:ee
MAC : ff:ff:ff:ff:ff:ff
MAC : gg:gg:gg:gg:gg:gg
IP : 10.0.1.0
IP : 10.0.1.1
IP : 10.0.1.2
IP : 10.0.1.3
IP : 10.0.1.4
IP : 10.0.1.5
IP : 10.0.1.6
Status : Operational
Status : Operational
Status : Operational
Status : Operational
Status : Operational
Status : Operational
Status : Operational
Interface : X2
Interface : X2
Interface : X2
Interface : X2
Interface : X2
Interface : X2
Interface : X2
I'd like them all to output as shown below
Name : WiFi 1
MAC : aa:aa:aa:aa:aa:aa
IP : 10.0.1.0
Status : Operational
Interface : X2