pushkar raj wrote: > Hi everybody, > > I have two text files. One of them contains a sequence of character > terminated by newline. File 1 > for eg.....gnlase#5678940 > gnlase#3421667 > ..................... and so on. > > The other file also contains a sequence of character which may begin with > above string. After each sequence there is sequence of character which > describes the above string. File 2 > for eg........ gnlase#5647120 > a sequence of character which describes above string. > >gnlase#543271 > a sequence of character describing above string. > >...... and so on. > I need to find the match the string pattern from file 1 with string pattern > of file 2, if they are same then i need to copy the description of that > string in another file say File 3. > > Each string pattern in file 2 begins with a '>' character which is followed > by description which runs in several lines. > Please suggest a solution to this problem using C code.
This would be _significantly_ easier and faster if you used C++. Doing what you want is either going to be performance-unfriendly (as Nico's suggestion pointed out) OR is going to be very time-consuming coming up with an optimal solution. Any chance you'll switch languages? -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* VerifyMyPC 2.4 Change tracking and management tool. Reduce tech. support times from 2 hours to 5 minutes. http://www.CubicleSoft.com/VerifyMyPC/
