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
shell-script
New contributor
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.
add a comment |
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
shell-script
New contributor
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
add a comment |
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
shell-script
New contributor
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
shell-script
New contributor
New contributor
edited Nov 21 at 4:08
Rui F Ribeiro
38.2k1475125
38.2k1475125
New contributor
asked Nov 21 at 3:38
Suresh
6
6
New contributor
New contributor
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
2
This is not a homework making service.
– Rui F Ribeiro
Nov 21 at 4:10