I'm a newbie for the scripting, but I have a task need to be done. Here is my problem, please help.
I've got the following two input files. Input file_1 contains alot of IDs (11 digits), each in a separate line. In Input file_2, there is only one line.
What I what to is open Input file_1, loop through it, use each of the IDs to replace XXXXXXXXXXX in Input file_2 and generate a new output file.
Input file_1
111111111111
222222222222
333333333333
444444444444
555555555555
666666666666
777777777777
888888888888
999999999999
Input File_2
AM01999999999AM02FE34AM05D7XXXXXXXXXXXAM10F4over
Output file
AM01999999999AM02FE34AM05D7111111111111AM10F4over
AM01999999999AM02FE34AM05D7222222222222AM10F4over
AM01999999999AM02FE34AM05D7333333333333AM10F4over
AM01999999999AM02FE34AM05D7444444444444AM10F4over
AM01999999999AM02FE34AM05D7555555555555AM10F4over
AM01999999999AM02FE34AM05D7666666666666AM10F4over
AM01999999999AM02FE34AM05D7777777777777AM10F4over
AM01999999999AM02FE34AM05D7888888888888AM10F4over
AM01999999999AM02FE34AM05D7999999999999AM10F4over
--
Thanks
mike
I've got the following two input files. Input file_1 contains alot of IDs (11 digits), each in a separate line. In Input file_2, there is only one line.
What I what to is open Input file_1, loop through it, use each of the IDs to replace XXXXXXXXXXX in Input file_2 and generate a new output file.
Input file_1
111111111111
222222222222
333333333333
444444444444
555555555555
666666666666
777777777777
888888888888
999999999999
Input File_2
AM01999999999AM02FE34AM05D7XXXXXXXXXXXAM10F4over
Output file
AM01999999999AM02FE34AM05D7111111111111AM10F4over
AM01999999999AM02FE34AM05D7222222222222AM10F4over
AM01999999999AM02FE34AM05D7333333333333AM10F4over
AM01999999999AM02FE34AM05D7444444444444AM10F4over
AM01999999999AM02FE34AM05D7555555555555AM10F4over
AM01999999999AM02FE34AM05D7666666666666AM10F4over
AM01999999999AM02FE34AM05D7777777777777AM10F4over
AM01999999999AM02FE34AM05D7888888888888AM10F4over
AM01999999999AM02FE34AM05D7999999999999AM10F4over
--
Thanks
mike