Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

TPIPE /selection

May
12,846
164
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.
 
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] ...
 
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).
 
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.)
 
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.
 
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

Back
Top