How is it supposed to work? It has 8 parameters, right? None of these work. Code: g:\tc14> type fleas.txt My dog has fleas. g:\tc14> do i=0 to 6 (tpipe /input=fleas.txt /grep=%i,0,0,0,0,0,0,M) TPIPE: The parameter is incorrect. "/grep=0,0,0,0,0,0,0,M" TPIPE: The parameter is incorrect. "/grep=1,0,0,0,0,0,0,M" TPIPE: The parameter is incorrect. "/grep=2,0,0,0,0,0,0,M" TPIPE: The parameter is incorrect. "/grep=3,0,0,0,0,0,0,M" TPIPE: The parameter is incorrect. "/grep=4,0,0,0,0,0,0,M" TPIPE: The parameter is incorrect. "/grep=5,0,0,0,0,0,0,M" TPIPE: The parameter is incorrect. "/grep=6,0,0,0,0,0,0,M" And what are the differences among "restrict", "extract", and "remove"?
No, it has 9 parameters: TypeIncludeLineNumbers IncludeFilenameMatchCase CountMatchesPatternTypeUTF8 IgnoreEmptyPattern (But I didn't think anybody would be crazy brave enough to try it while it was still flagged as untested!) Tested and fixed some minor bugs for build 15. Extract and remove seem pretty self-explanatory. Restrict is only relevant for subfilters, which I haven't documented yet.
"Extract" and "remove" mean the same thing! PatternType" missing here (from the help). Code: /grep=Type,IncludeLineNumbers,IncludeFilename,IgnoreCase,CountMatches,UTF8,IgnoreEmpty,Pattern
Extract means copy those lines to the output file. Remove means don't copy those lines to the output file.
So, do "extract matching lines" and "remove non-matching lines" mean the same thing? What about "extract non-matching lines" vs. "remove matching lines"?
No. When you "extract", you keep the lines (and put them in a new file). When you remove, you delete them. No. See above.
I still don't get it. When you "remove non-matching lines", what happens to the matching ones? In a very simple test, /grep with types 3 (extract matching lines) and 6 (remove non-matching lines) produce the same output (or an identical file).
Try it in a not-very-simple test, when you're sending output to multiple files, or overwriting the original file, or passing the results to subfilters.
Grep types 3 and 6 seem to work the same when overwriting the input file. I don't know how to specify multiple output files and I know even less about subfilters. This reminds me a little of trying to figure out how Oniguruma works from the header file.
I would advise waiting until you actually have a need to use this syntax, by which time the documentation should be substantially complete.