in reply to Text file manupulation to create test files

for creating the new format, you might use the following approach:

  1. read the input-file line-by-line
  2. if a line starts with SBSB_ID
    • extract everything befor the WMDS_SEQ and write it to your output-file
    • split the rest into WMDS_SEQ-blocks and print all of them to your output-file (seperated by \n)
for creating many SBS_ID-blocks you might modify step 2 of the algorithm above as follows:

HTH, Rata

Replies are listed 'Best First'.
Re^2: Text file manupulation to create test files
by ajguitarmaniac (Sexton) on Jan 10, 2011 at 14:09 UTC

    Thank you! Will implement your logic and get back if i'm stuck at any point!