Hoi,

Een programma verwerkt een lijst.
Doet dat goed, de output is minder.

<output>
Setup info foo
Setup info bar
Processing data 1
Processing failed
Processing data 2
Processing failed
Processing data 3
Processing failed
Processing data 4
Processing failed
Processing data 5
Processing failed
Processing data 6
Processing failed
   <knip/>
Processing data n
Processing failed
Processing data n+1
Processing failed
Processing data n+2
Processing failed
Processing data n+3
Processing failed
Processing data n+4
Result: asdfadf
Result: asdasferqwe
Result: askjkqerqr
Processing data n+5
Processing failed
Processing data n+6
Processing failed
Processing data n+7
Processing failed
Processing data n+8
Processing failed
   <knip/>
Processing data n+m
Processing failed
Processing data n+m+1
Processing failed
Processing data n+m+2
Processing failed
Final statistics
</output>


Wat ik zou willen hebben, is
<output>
Setup info foo
Setup info bar
Processing data n+4
Result: asdfadf
Result: asdasferqwe
Result: askjkqerqr
Final statistics
</output>

Dus dat "kopregels" met "Processing data recordnummer" niet getoond worden
als de processing is mislukt. De regels met "Processing failed" zijn ook
niet nodig.

Met sed en/of awk krijg ik het niet voormekaar.

Wat zien jullie aan mogelijkheden?


Groeten
Geert Stappers
-- 
Leven en laten leven


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: https://lists.debian.org/[email protected]

Antwoord per e-mail aan