Need to compare and print the matching column [closed]











up vote
0
down vote

favorite












If the diskUUID "5b5ab9f7-fcf51f0d-441c-005056012786" matches in file1 and file2, need to print "Volume name" "Uncle Scrooge" for the disk UUID in file2 as a output





File1: (output from SQL query)



name
------
test
test
(2 rows)
networkcompressionenabled
---------------------------
f
f
(2 rows)

rpo
-----
60
60
(2 rows)
quiesceguestenabled
---------------------
f
f
(2 rows)
configfilesdatastoremoid
--------------------------
datastore-141
datastore-141
(2 rows)
diskuuid
--------------------------------------
5b5ab9f7-fcf51f0d-441c-005056012786
5b5ab9f7-fcf51f0d-441c-005056012786
(2 rows)


file2 :



Volume Name    VMFS UUID                            Extent Number  Device Name                           Partition
------------- ----------------------------------- ------------- ------------------------------------ ---------
Uncle Scrooge 5b5ab9f7-fcf51f0d-441c-005056012786 0 naa.6000eb360d5d81c000000000000000ed 1









share|improve this question









New contributor




Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as off-topic by Rui F Ribeiro, RalfFriedl, G-Man, Archemar, schily Nov 21 at 13:16



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2




    This is not a homework making service.
    – Rui F Ribeiro
    Nov 21 at 4:10















up vote
0
down vote

favorite












If the diskUUID "5b5ab9f7-fcf51f0d-441c-005056012786" matches in file1 and file2, need to print "Volume name" "Uncle Scrooge" for the disk UUID in file2 as a output





File1: (output from SQL query)



name
------
test
test
(2 rows)
networkcompressionenabled
---------------------------
f
f
(2 rows)

rpo
-----
60
60
(2 rows)
quiesceguestenabled
---------------------
f
f
(2 rows)
configfilesdatastoremoid
--------------------------
datastore-141
datastore-141
(2 rows)
diskuuid
--------------------------------------
5b5ab9f7-fcf51f0d-441c-005056012786
5b5ab9f7-fcf51f0d-441c-005056012786
(2 rows)


file2 :



Volume Name    VMFS UUID                            Extent Number  Device Name                           Partition
------------- ----------------------------------- ------------- ------------------------------------ ---------
Uncle Scrooge 5b5ab9f7-fcf51f0d-441c-005056012786 0 naa.6000eb360d5d81c000000000000000ed 1









share|improve this question









New contributor




Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as off-topic by Rui F Ribeiro, RalfFriedl, G-Man, Archemar, schily Nov 21 at 13:16



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2




    This is not a homework making service.
    – Rui F Ribeiro
    Nov 21 at 4:10













up vote
0
down vote

favorite









up vote
0
down vote

favorite











If the diskUUID "5b5ab9f7-fcf51f0d-441c-005056012786" matches in file1 and file2, need to print "Volume name" "Uncle Scrooge" for the disk UUID in file2 as a output





File1: (output from SQL query)



name
------
test
test
(2 rows)
networkcompressionenabled
---------------------------
f
f
(2 rows)

rpo
-----
60
60
(2 rows)
quiesceguestenabled
---------------------
f
f
(2 rows)
configfilesdatastoremoid
--------------------------
datastore-141
datastore-141
(2 rows)
diskuuid
--------------------------------------
5b5ab9f7-fcf51f0d-441c-005056012786
5b5ab9f7-fcf51f0d-441c-005056012786
(2 rows)


file2 :



Volume Name    VMFS UUID                            Extent Number  Device Name                           Partition
------------- ----------------------------------- ------------- ------------------------------------ ---------
Uncle Scrooge 5b5ab9f7-fcf51f0d-441c-005056012786 0 naa.6000eb360d5d81c000000000000000ed 1









share|improve this question









New contributor




Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











If the diskUUID "5b5ab9f7-fcf51f0d-441c-005056012786" matches in file1 and file2, need to print "Volume name" "Uncle Scrooge" for the disk UUID in file2 as a output





File1: (output from SQL query)



name
------
test
test
(2 rows)
networkcompressionenabled
---------------------------
f
f
(2 rows)

rpo
-----
60
60
(2 rows)
quiesceguestenabled
---------------------
f
f
(2 rows)
configfilesdatastoremoid
--------------------------
datastore-141
datastore-141
(2 rows)
diskuuid
--------------------------------------
5b5ab9f7-fcf51f0d-441c-005056012786
5b5ab9f7-fcf51f0d-441c-005056012786
(2 rows)


file2 :



Volume Name    VMFS UUID                            Extent Number  Device Name                           Partition
------------- ----------------------------------- ------------- ------------------------------------ ---------
Uncle Scrooge 5b5ab9f7-fcf51f0d-441c-005056012786 0 naa.6000eb360d5d81c000000000000000ed 1






shell-script






share|improve this question









New contributor




Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 21 at 4:08









Rui F Ribeiro

38.2k1475125




38.2k1475125






New contributor




Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 21 at 3:38









Suresh

6




6




New contributor




Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




closed as off-topic by Rui F Ribeiro, RalfFriedl, G-Man, Archemar, schily Nov 21 at 13:16



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Rui F Ribeiro, RalfFriedl, G-Man, Archemar, schily Nov 21 at 13:16



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 2




    This is not a homework making service.
    – Rui F Ribeiro
    Nov 21 at 4:10














  • 2




    This is not a homework making service.
    – Rui F Ribeiro
    Nov 21 at 4:10








2




2




This is not a homework making service.
– Rui F Ribeiro
Nov 21 at 4:10




This is not a homework making service.
– Rui F Ribeiro
Nov 21 at 4:10















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Morgemoulin

Scott Moir

Souastre