Hello,
I have the following problem:
There are two csv files
csv-file #1:
aaa1, aaa2, ... aaan
aaa1, bbb2, ... bbbn
aaa1, ccc2, ... cccn
bbb1, bbb2, ... bbbn
...
zzz1, zzz2, ... zzzn
csv-file #2:
aaa1, matchvalue1
ccc1, matchvalue2
bbb1, matchvalue3
...
Each line of csv-file #1 shall get appended the crresponding "matchvalue" of csv-file #2,
e.g. if a line contains the reference value aaa1, this line shall be appended by matchvalue1 of csv-file #2.
Finally csv-file #2 would look like this:
aaa1, aaa2, ... aaan, matchvalue1
aaa1, bbb2, ... bbbn, matchvalue1
aaa1, ccc2, ... cccn, matchvalue1
bbb1, bbb2, ... bbbn, matchvalue3
...
In csv-file #1 the "reference values" - in my example the first element of the line, may occur in more than one line.
In the example it is the first element of each line.
How would the script look like if it may be at any other particular position of the line, e.g. always the third element of each line ?
Can anyone please help me and submit a solution ?
Thanks so much !
Regards
G.