Welcome!

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

SignUp Now!

tpipe instructions for newbies

For newbies, are there instructions for writing tpipe commands? There is a long list of parameters but I can find no examples how to write the commands. For example, how do I make it sort lines of a text file, assuming that it can do that?
 
The only instructions for writing tpipe commands comes from this forum.

A search of the forum will provide you with how others are using tpipe.

For myself, I have created a few aliases to assist me with using tpipe;
Code:
pdf2txt=tpipe /input=%1 /simple=76
RemoveBlanksFromStartOfLine=tpipe /simple=12
RemoveHTML=tpipe /simple=16
RemoveMultipleWhiteSpace=tpipe /simple=19

In answer to your question, using the following text file;
Code:
R:\>type test.txt
one
two
three
four
five
six
seven
eight
nine
ten

Use the following to sort the above file;
Code:
R:\>type test.txt | tpipe /sort=2,0,0,1,40
eight
five
four
nine
one
seven
six
ten
three
two

To make things easier for myself, I convert the tpipe command into an alias;
Code:
alias mysort=tpipe /sort=2,0,0,1,40

Now, I can sort the file as before;
Code:
R:\>type test.txt | mysort 
eight
five
four
nine
one
seven
six
ten
three
two

I prefer to pipe the file.
You can also;
Code:
R:\>tpipe /input=test.txt /sort=2,0,0,1,40
eight
five
four
nine
one
seven
six
ten
three
two

YMMV

Joe
 
Back
Top