I have two files. Each field in files is seperated with comma.
The first files has 7 fields and the second one only 2.
I want to take the second field from the first file and search the content of this field in the second file.
If found, the script should copy the line of the first file and the found line of the second file into one line in a new file.
Example:
file1:
19,768,ROHRLEITUNGEN-IM-7M-STREIFEN-DER-BE,####,####,####,25/08/2003
19,798,FUNDAMENTE-ZUM-CHLORKESSEL-LAGER-4,####,####,####,05/03/1997
...
file2:
r1900898.dgn,\\ta-cad\ac\r1900898.dgn
r1900768.dgn,\\ta-cad\ac\r1900768.dgn
J+G-Farbe.ctb,\\ta-cad\ACAD_Umgebung\Plot Styles\J+G-Farbe.ctb
r1900798.dgn,\\ta-cad\ac\r1900798.dgn
r1923908.dgn,\\ta-cad\ac\r1923908.dgn
....
The result shuld be like this:
19,768,ROHRLEITUNGEN-IM-7M-STREIFEN-DER-BE,####,####,####,25/08/2003,r1900768.dgn,\\ta-cad\ac\r1900768.dgn
19,798,FUNDAMENTE-ZUM-CHLORKESSEL-LAGER-4,####,####,####,05/03/1997,r1900798.dgn,\\ta-cad\ac\r1900798.dgn
greets
rübensau
The first files has 7 fields and the second one only 2.
I want to take the second field from the first file and search the content of this field in the second file.
If found, the script should copy the line of the first file and the found line of the second file into one line in a new file.
Example:
file1:
19,768,ROHRLEITUNGEN-IM-7M-STREIFEN-DER-BE,####,####,####,25/08/2003
19,798,FUNDAMENTE-ZUM-CHLORKESSEL-LAGER-4,####,####,####,05/03/1997
...
file2:
r1900898.dgn,\\ta-cad\ac\r1900898.dgn
r1900768.dgn,\\ta-cad\ac\r1900768.dgn
J+G-Farbe.ctb,\\ta-cad\ACAD_Umgebung\Plot Styles\J+G-Farbe.ctb
r1900798.dgn,\\ta-cad\ac\r1900798.dgn
r1923908.dgn,\\ta-cad\ac\r1923908.dgn
....
The result shuld be like this:
19,768,ROHRLEITUNGEN-IM-7M-STREIFEN-DER-BE,####,####,####,25/08/2003,r1900768.dgn,\\ta-cad\ac\r1900768.dgn
19,798,FUNDAMENTE-ZUM-CHLORKESSEL-LAGER-4,####,####,####,05/03/1997,r1900798.dgn,\\ta-cad\ac\r1900798.dgn
greets
rübensau