I want to merge the matching pattern with awk on a Solaris system.
$ luxadm probe
No Network Array enclosures found in /dev/es
Found Fibre Channel device(s):
Node WWN:2000000c50f1c8da Device Type:Disk device
Logical Path:/dev/rdsk/c1t1d0s2
Node WWN:2000000c50f1d9c9 Device Type:Disk device
Logical Path:/dev/rdsk/c1t0d0s2
Note - While I am trying with awk, it takes Only one line merging from last.
$ luxadm probe |awk '/Node/{n=$2}/Logical/{l=$2} END {print n,l}'
WWN:2000000c50f1d9c9 Path:/dev/rdsk/c1t0d0s2
While the output expected is:
WWN:2000000c50f1d9c9 Path:/dev/rdsk/c1t0d0s2
WWN:2000000c50f1c8da Path:/dev/rdsk/c1t1d0s2