Thank you for the replies. Let me put some more clarify around the request, as suggested, as I'm not sure the awk suggestions are working.
First here is the csv, that contains the list of GUIDS:
$ cat test.csv
8121E002-96FE-4C9C-BC5A-6AFF20DACECD
84468F30-F3B7-418B-81F0-0908E80792BF
8121E002-96FE-4C9C-BC5A-6AFF20DACECD
1BCE1E40-D1BE-4DC1-8A0C-9EB236F56944
Now, here is an example of the csv that contains the data I'm trying to retrieve:
"test","data/content/FN0/FN0/FN0/170535BB-A28D-42C4-92ED-767BB1469C8D%7BC0348F5A-0000-C624-9710-5ED2E8AA2B14%7D0"
"test","data/content/FN0/FN0/FN0/17ECDCFA-AF30-4C82-A156-99F941739352%7B1373E3F5-D5BE-475B-900F-B73ECB05C6AB%7D0"
"test","data/content/FN0/FN0/FN0/182FECB0-ADBF-4F27-9DD6-CE5508872AA5%7BC88C4971-F16A-4C28-9E14-07D0AD4E3C79%7D0"
"test","data/content/FN0/FN0/FN0/194D4F16-CD21-46EF-A584-8C378FBAD55F%7B439BC63F-C291-479D-BFEC-121BC86E3988%7D0"
"test","data/content/FN0/FN0/FN0/1AD46B75-8357-421D-A072-64872C6C763C%7BF299763B-D507-4303-A819-00BD0C60AAA5%7D0"
"test","data/content/FN0/FN0/FN0/1B810336-4EA7-49E3-8325-69487AC0CE95%7BD2F0EDEA-1486-451C-A09C-9AC39D582BBF%7D0"
"test","data/content/FN0/FN0/FN0/1BA93974-FFCC-4BE2-AFBE-11B92D579D4B%7B805AFF56-0000-CC14-9F56-C335802C5C15%7D0"
"test","data/content/FN0/FN0/FN0/1BBC8C9A-725B-428D-AC5A-9C0129C80F82%7BE515FB66-D51E-4057-97C8-94CDEC52F83A%7D0"
"test","data/content/FN0/FN0/FN0/1BCE1E40-D1BE-4DC1-8A0C-9EB236F56944%7B496DDE3B-6102-4744-80FA-C30D64D91815%7D0"
As you can see, 1BCE1E40-D1BE-4DC1-8A0C-9EB236F56944
is in both the first csv and the 2nd csv. The last line of the 2nd csv it is embedded into a double GUID. I want the output to be:
1BCE1E40-D1BE-4DC1-8A0C-9EB236F56944, "data/content/FN0/FN0/FN0/1BCE1E40-D1BE-4DC1-8A0C-9EB236F56944%7B496DDE3B-6102-4744-80FA-C30D64D91815%7D0"
I tried the following suggestion:
awk -F "," 'BEGIN{OFS=FS}NR==FNR{q=$1;$1="";A[q]=$0;;next} {q=$2;gsub(/.*\/|\..*/,"",$2)} ($2 in A) {print $2,q}' test.csv file2.csv
But it did not find the above GUID.
RudiC, for your suggestion, where do I pass in the first filename?
Hopefully that helps!
Regards
Tirm