TPIPE /selection

May 20, 2008
11,530
102
Syracuse, NY, USA
At least I can get it to do something now (with build 20). But I don't think it can do what I want (what CUT.EXE does), namely select the fields/columns to be output ... like this
Code:
v:\> echo My dog has fleas. | g:\gnu\cut.exe -f2 -d " "
dog
If I read the help correctly, it can only move, copy, and remove. Outputting the selected fields seems more useful.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
If I read the help correctly, it can only move, copy, and remove. Outputting the selected fields seems more useful.

I agree, esp. since you may not know how many fields a line contains that you would need to remove to be left with only those of interest. It needs a selection syntax that is analogous to @WORD: %@remove[separator,3-9999,string] ...
 
May 20, 2008
11,530
102
Syracuse, NY, USA
I agree, esp. since you may not know how many fields a line contains that you would need to remove to be left with only those of interest. It needs a selection syntax that is analogous to @WORD: %@remove[separator,3-9999,string] ...
The syntax for CUT.EXE is quite simple and goes well beyond that. For example, the spec "-f2,7-9,13,15-" will give (output) fields 2, 7 through 9, 13, 15, and thereafter; likewise for characters (-c).
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
At least I can get it to do something now (with build 20). But I don't think it can do what I want (what CUT.EXE does), namely select the fields/columns to be output ... like this
Code:
v:\> echo My dog has fleas. | g:\gnu\cut.exe -f2 -d " "
dog
If I read the help correctly, it can only move, copy, and remove. Outputting the selected fields seems more useful.

There are two ways to do it:

1) Use the select filter and a subfilter (but I haven't documented the subfilters yet).
2) Use two select filters. (This is the easiest and just as fast.)
 
May 20, 2008
11,530
102
Syracuse, NY, USA
There are two ways to do it:

1) Use the select filter and a subfilter (but I haven't documented the subfilters yet).
2) Use two select filters. (This is the easiest and just as fast.)
I don't know what you're up against but doesn't the interface to the "selection" action have an "extract" option?

I hope subfilters are very powerful. With CUT.EXE, "-f2,4,6,8,10" will output precisely those five fields. Would I have to use *six* TPIPE selection filters to get rid of the ones Idon't want? That alone would be a couple hundred characters

I'm just playing with TPIPE. With seven text utils (grep, sed, wc, sort, tr, cut, egrep) I can do just about anything I want. I'd like to see TPIPE replace all of those and be super-fast but I doubt it will and I don't process enough data to get back the time I'd spent composing TPIPE commands. I suppose anyone who will use TPIPE regularly will have quite a collection of aliases

Are you going to be the go-between when the TextPipe engine doesn't do what it's supposed to? Will those folks be as timely as you when it comes to bug fixes? What ever happened to TPIPE /sort? I'll bet the recently discovered bug in TPIPE /grep (counting matches) isn't yours.
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
I don't know what you're up against but doesn't the interface to the "selection" action have an "extract" option?

No. If it did, it would be listed in the TPIPE /selection documentation.

Are you going to be the go-between when the TextPipe engine doesn't do what it's supposed to? Will those folks be as timely as you when it comes to bug fixes? What ever happened to TPIPE /sort? I'll bet the recently discovered bug in TPIPE /grep (counting matches) isn't yours.

Why would TPIPE & the TextPipe engine be any different from any other Windows or third-party dll that Take Command uses? You don't communicate directly with the Microsoft or third-party developers for any other dll.

I already said that TPIPE /sort would not be in the 14.0 release.
 
Similar threads
Thread starter Title Forum Replies Date
samintz How to? TPIPE /simple=61 Support 6
R Bug TPIPE's pdf to text conversions don't work Support 2
Kachupp How to? tpipe Support 4
H TPIPE /simple=4 Support 12
D TPIPE produces unwanted logs. Support 1
Kachupp How to? tpipe Support 8
vefatica Documentation TPIPE, /perl, DotMatchesNewLines Support 1
vefatica Stop TPIPE /EOL removing bad EOLs (and TPIPE changine EOLs)? Support 2
vefatica TPIPE in an alias? Support 2
C How to? TPIPE ?'s Support 2
H History and TPipe Oddness Support 3
Jay Sage Baffling Behavior With TPIPE Support 5
vefatica TPIPE: unbalanced escaped quotes in a regex? Support 5
Joe Caverly Multiple Text Searches at once using FFIND or TPIPE Support 4
Kachupp FFIND TPIPE Support 9
vefatica TPIPE and avarice? Support 5
Peter Murschall TPIPE generate unicode on Piping or redirecting Support 3
x13 TPIPE /REPLACE - Remove line (including EOL) Support 3
Charles Dye Documentation TPIPE /REPLACELIST Support 0
Joe Caverly TPIPE and /inputstring Support 3
vefatica How to? Add real <ESC> characters with TPIPE Support 2
vefatica How to? TPIPE ... see output right away? Support 4
vefatica TPIPE.EXE crashes on Ctrl-C Support 9
O TPIPE: Error -Can´t access textpipeengine.dll Support 24
vefatica Extract fields with TPIPE? Support 10
vefatica TPIPE, crash and question Support 1
MickeyF Another TPIPE question Support 6
MickeyF Can't get my TPIPE /replace to work Support 4
Joe Caverly Printing TPIPE documentation Support 3
C WAD tpipe /simple=28 Support 8
vefatica Remove double-quotes with TPIPE Support 4
vefatica TPIPE crashes on Ctrl-C Support 1
C How to? Add date/time to custom tpipe based BTM Support 1
C tpipe /simple=28 error Support 5
C TPipe /dup Support 5
T TPipe: Replacing String with Double Quotes Support 3
C tpipe and extract email addresses Support 1
vefatica How do I do this with TPIPE? Support 1
vefatica TPIPE's /perl option? Support 1
D TPIPE help typo Support 0
vefatica TPIPE access violations are back Support 2
Joe Caverly Word Count using TPIPE Support 10
Dan Glynhampton TPIPE in Build 41 Support 4
Phileosophos TPIPE doesn't work at all with v16 Support 3
vefatica TPIPE access violation again Support 1
David McClelland TPIPE matching problem Support 3
vefatica TPIPE: Access violation Support 5
jbanaszczyk TCMD 16 - TPIPE Support 4
P TPipe relaunches TCC window and 4start, etc Support 7
Phileosophos Documentation TPIPE /string type code confusion Support 4

Similar threads