ddrew78 has asked for the wisdom of the Perl Monks concerning the following question:
File 2aa-aa1-aa aa-aa2-aa aa-aa2-ab aa-aa3-bc
A third file will look like this:V1111:something V1111:something V2222:something V1111:something
I need to search file 1 for matches to file 3, and then output the corresponding line from file 2. So with the example above, the output should showaa-aa1-aa aa-aa2-ab
Essentially, if the first match in file 1 is on line 3, I need line 3 from file 2. I have no idea on how to match those values up to get the output I need. Thanks as always for any ideas.V1111:something V2222:something
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Match line number in different file
by LanX (Saint) on Jan 06, 2020 at 20:42 UTC | |
Re: Match line number in different file
by tybalt89 (Monsignor) on Jan 06, 2020 at 21:04 UTC | |
Re: Match line number in different file
by poj (Abbot) on Jan 09, 2020 at 10:13 UTC | |
by ddrew78 (Beadle) on Jan 09, 2020 at 12:47 UTC | |
Re: Match line number in different file
by Anonymous Monk on Jan 09, 2020 at 00:28 UTC | |
by ddrew78 (Beadle) on Jan 09, 2020 at 12:48 UTC |