Note that there are some explanatory texts on larger screens.

plurals
  1. POsearch for a string between repetitive tags in a txt file
    primarykey
    data
    text
    <p>Need some help with respect to search for a string between repetitive tags I have a text file with following format repeating many times within a file</p> <p>========== File Name: fixed_am_7bitLI_HE10.txt Test Case: Test_Case_1 START ==========</p> <p>Block 1 TC ID OK</p> <p>Block 2 Input section OK data section OK</p> <p>Block 3 Input section OK data section OK</p> <p>Block 4 Input section OK data section OK</p> <p>========== File Name: fixed_am_7bitLI_HE10.txt Test Case: Test_Case_2 START ========</p> <p>Block 1 TC ID OK</p> <p>Block 2 Input section OK</p> <ul> <li>line mismatch: output line: "Buffer allocated from pool: MIF_CTRL_POOL, buffer_id: 1, size (words): 4" reference line: "pdcp_pdu_delete_count = 0, reset_cip_rdy = 1"</li> <li>line mismatch: output line: "pdcp_pdu_delete_count = 0, reset_cip_rdy = 1" reference line: "-- MIF CTRL output: --------------------------------------------------------------------------------"</li> <li>line mismatch: output line: "-- MIF CTRL output: --------------------------------------------------------------------------------" reference line: "mif_ctrl_rlc_am_um_reset_reestablish_ind_t.rlc_reset_reestablish_ind = 3 (0x0003)"</li> <li>line mismatch: output line: "mif_ctrl_rlc_am_um_reset_reestablish_ind_t.rlc_reset_reestablish_ind = 3 (0x0003)" reference line: "Buffer released from pool: MIF_CTRL_POOL, buffer_id 0, size (words) 6 (used 5)"</li> <li>line count mismatch: last output line: "mif_ctrl_rlc_am_um_reset_reestablish_ind_t.rlc_reset_reestablish_ind = 3 (0x0003)" last reference line: "Buffer released from pool: MIF_CTRL_POOL, buffer_id 0, size (words) 6 (used 5)" </li> </ul> <p>data section DIFFERS</p> <p>Block 3 Input section OK data section OK</p> <p>Block 4 Input section OK data section OK</p> <p>========== File Name: fixed_am_7bitLI_HE10.txt Test Case: Test_Case_3 START ========</p> <p>Block 1 TC ID OK</p> <p>Block 2 Input section OK data section OK</p> <p>Block 3 Input section OK data section OK</p> <p>Block 4 Input section OK data section OK</p> <p>**I need to find if anything other than 'OK' exists between the Start tags and if yes i have to mark the particular block as failed</p> <p>for example if i find any other than OK between Test Case: Test_Case_1 START and Test Case: Test_Case_2 START i have to mark Test Case: Test_Case_1 as failed</p> <p><strong>UPDATED</strong> Expected Output in somewhat this format</p> <p>File Name: fixed_am_7bitLI_HE10.txt Test Case: Test_Case_1 Status: PASS (if there is no string as 'DIFFERS' between tags (==)</p> <p>File Name: fixed_am_7bitLI_HE10.txt Test Case: Test_Case_2 Status: FAILED (if there is string 'DIFFERS' between tags (==)</p> <p><strong>UPDATE -2</strong></p> <p>If in case Test Case fails </p> <p>File Name: fixed_am_7bitLI_HE10.txt Test Case: Test_Case_2 Status: FAILED</p> <p>Section of block differing is:</p> <p>Block 2</p> <p>Input section OK</p> <ul> <li>line mismatch: output line: "Buffer allocated from pool: MIF_CTRL_POOL, buffer_id: 1, size (words): 4" reference line: "pdcp_pdu_delete_count = 0, reset_cip_rdy = 1"</li> <li>line mismatch: output line: "pdcp_pdu_delete_count = 0, reset_cip_rdy = 1" reference line: "-- MIF CTRL output: --------------------------------------------------------------------------------"</li> <li>line mismatch: output line: "-- MIF CTRL output: --------------------------------------------------------------------------------" reference line: "mif_ctrl_rlc_am_um_reset_reestablish_ind_t.rlc_reset_reestablish_ind = 3 (0x0003)"</li> <li>line mismatch: output line: "mif_ctrl_rlc_am_um_reset_reestablish_ind_t.rlc_reset_reestablish_ind = 3 (0x0003)" reference line: "Buffer released from pool: MIF_CTRL_POOL, buffer_id 0, size (words) 6 (used 5)"</li> <li>line count mismatch: last output line: "mif_ctrl_rlc_am_um_reset_reestablish_ind_t.rlc_reset_reestablish_ind = 3 (0x0003)" last reference line: "Buffer released from pool: MIF_CTRL_POOL, buffer_id 0, size (words) 6 (used 5)" </li> </ul> <p>data section DIFFERS</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload