I used awk to merge but , SGNAME if file 1 is not displayed ;total i want to do later...
awk 'FNR == NR { arr[$0]=$2; next }
{ $(NF+1)=($1 in arr) ? arr[$1] : " "; print }' file1 file2
i get output like...
LUN 1997 LUN UID 60:06:01:60:20:84:24:00:BE:00:F9:CD:84:97
E:11 LUN Cap 76800 MB
LUN 2015 LUN UID 60:06:01:60:20:84:24:00:9C:85:B8:5D:FD:B2
E:11 LUN Cap 76800 MB
LUN 1946 LUN UID 60:06:01:60:35:84:24:00:FD:56:6D:1F:85:97
E:11 LUN Cap 76800 MB
LUN 2002 LUN UID 60:06:01:60:35:84:24:00:CD:2C:F1:BE:84:97
E:11 LUN Cap 76800 MB
I need SGNAME and the respective LUNS under SGNAME ;again SGNAME LUNs kind of pattern... tried using Join again the same missing SGNAME....
nawk is not working ...