I have the two files. And i want the each line of first file to be inserted in the beginning of second file each line and the final output should be like this. Could anyone help me on this?
Thanks for the solution given. Its works fine. But my exact requirement is, i am having one <td> data in one file and i want to inset that into another file within the <tr> tag. Could you please help me on this.
With the fine working examples by itkamaraj, how would YOU tackle the NEW problem? BTW, wouldn't it have been nice to post the real samples in the first place, saving your and our time?
Dear R. Singh,
It works well and getting the desired output. In some very rare case, my sql is giving more than one <tr> tag as output in the same line as given below.
In this case, how can i insert my <td> tag from file1 into file2 as first <td> tag independent of how many <tr> tags are present in same line in file2.
As mentioned by RudiC previously, kindly put your requirements all together in a single post with proper sample Input_file and proper expected output_file.
For your current shown files in your previous post, could you please try following and let me know if this helps you.
Your code is perfectly working irrespective of number of <tr> tags in a line.
R. Singh,
Code given by you is inserting the <td> tags from 1st file to 2nd file. But it is misplacing the tags and and not printing the rest of the <tr> tags from 2nd file.