TPIPE questions....

Apr 2, 2011
1,441
10
54
North Carolina, USA
Is TPIPE columns 1 or 0 based?

/dup=Type,MatchCase,StartColumn,Length,IncludeOne

For the length number - would it be the same as %_LINES_MAXLEN after a %@lines[filename] is done?

For the "IncludeOne - Include lines with a count of 1" - not sure what is meant here?

I did read the CHM but I am still a bit unsure....
 
May 20, 2008
11,400
99
Syracuse, NY, USA
When you use "Type" = 1 (Show duplicate lines), the last option determines whether you see lines with count of 1 (i.e., lines with no duplicates).
Code:
v:\> type abc.txt
a
a
b
c
c
c

v:\> tpipe /input=abc.txt /dup=1,0,0,1,0
2 a
3 c

v:\> tpipe /input=abc.txt /dup=1,0,0,1,1
2 a
1 b
3 c

All I can gather from below is that the column numbering starts with 1 but 0 is accepted as equivalent to 1. That's odd. Maybe Rex will explain it further.
Code:
v:\> type abc.txt
qaa
rba
sca

v:\> tpipe /input=abc.txt /dup=1,0,0,1,1
1 qaa
1 rba
1 sca

v:\> tpipe /input=abc.txt /dup=1,0,1,1,1
1 qaa
1 rba
1 sca

v:\> tpipe /input=abc.txt /dup=1,0,2,1,1
1 qaa
1 rba
1 sca

v:\> tpipe /input=abc.txt /dup=1,0,3,1,1
3 qaa

v:\>
 
Apr 2, 2011
1,441
10
54
North Carolina, USA
tpipe /input=tcmd.all /dup=0,1,0,999999,1 /output=tcmd_nodups.all

wouldn't this create a file with all lines - minus those with duplicates?

type aaa.aaa
a
a
a
b
d
c

>tpipe /input=aaa.aaa /dup=0,1,0,999999,1 /output=bbb.bbb

would result in
type bbb.bbb
a
b
d
c

bbb.bb is what I am looking for....... Just not sure of the /Dup= parameters....

<end of post>
 
May 20, 2008
11,400
99
Syracuse, NY, USA
That looks like simple removal of duplicates ///
Code:
v:\> type abc.txt
a
a
a
b
c
d

v:\> tpipe /input=abc.txt /output=abc1.txt /dup=0,0,1,1,1

v:\> type abc1.txt
a
b
c
d

v:\>
 
Apr 2, 2011
1,441
10
54
North Carolina, USA
So Am I correct in this?

v:\> type abc.txt
a
a
a
b
c
d

echo %@lines[abc.txt]
rem Above line will set %_LINES_MAXLEN as mentioned in the CHM

rem /dup=Type,MatchCase,StartColumn,Length,IncludeOne
tpipe /input=abc.txt /dup=0,1,0,%_LINES_MAXLEN,1 /output=abc_case_sensitive.txt
tpipe /input=abc.txt /dup=0,1,0,%_LINES_MAXLEN,0 /output=abc_case_insensitive.txt

Is the above lines correct - given the name of the output file???
 
May 20, 2008
11,400
99
Syracuse, NY, USA
That doesn't look right. /DUP's **2nd** parameter decides case sensitivity, not its last parameter. The only difference (other than the output file name) between your two examples is in the last parameter.
 
Similar threads
Thread starter Title Forum Replies Date
C tpipe questions Support 5
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

Similar threads