Hello John,
Unfortunately, my CMS-pipelines version is too old to know these options
of pick :-(
After unsuccessfull (yet informative) tries (with "take" which takes
only my first block, or with "if"+"locate" + "spec write read write read
..." whose "spec" don't get the lines filtered by the "locate"), I came
up with this :
"pipe stem input.",
"| I: if locate /theString/",
, /* prefix to identify theString */
"| spec /X/ 1 1-* next",
"| I:",
"| spec /./ 1 1-* next",
"| I:",
"| spec A: 1.1 .",
" if (A == 'X') then ",
, /* counter will be not null for the desired lines */
" set #0:=1",
" else ",
" if (#0 > 0 & #0 < 4) then ",
" set #0+=1",
" else ",
" set #0:=0",
" endif",
" endif",
" if (#0 > 0) then ",
" 1-* next",
" endif",
"| strip",
"| locate", /* get rid of null lines */
"| not chop 1", /* get rid of the prefix */
"| console"
That's not the smart solution I dreamed of, but that does the job.
By the way :
I had to add "strip"+"locate" at the end of my pipeline to get rid of
the null lines.
Is there a way to tell "spec" not to write these null lines in the first
place ?
Thanks
Michaël
-----Message d'origine-----
De : John P. Hartmann <[email protected]>
Envoyé : 31/08/2011 10:36
À : [email protected]
<[email protected]>
Cc :
Objet : Re: How can I smartly filter a big file of EXEC traces ?
Half, but not exactly what you want either, can be done with PICK from
count.