I have 2 commands that output the devices on my linux system:
$ devlist -t csv -o device,vol_name
device,vol name,
/dev/mapper/mpath62,volume1,
/dev/mapper/mpath63,my_volume,
/dev/mapper/mpath64,foo,
/dev/mapper/mpath65,bar,
/dev/mapper/mpath66,2nd_vol,
$ multipathd -k'show maps'
name sysfs uuid
mpath62 dm-0 20017380029ab0043
mpath65 dm-1 20017380029ab0044
mpath66 dm-2 20017380029ab0045
mpath63 dm-3 20017380029ab0046
mpath64 dm-4 20017380029ab0047
How can I merge the output to print (preferably, w/o creating temporary files):
device,vol name,
/dev/dm-0,volume1,
/dev/dm-3,my_volume,
/dev/dm-4,foo,
/dev/dm-1,bar,
/dev/dm-2,2nd_vol,
Thanks