1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TPIPE?

Discussion in 'Support' started by vefatica, May 16, 2012.

  1. vefatica

    vefatica

    Messages:
    5,107
    IPTOCOUNTRY.HEX is a 116402-line file that looks like this.
    Code:
    v:\> head v:\IpToCountry.hex
    00000000,00FFFFFF,ZZ
    01000000,010000FF,AU
    01000100,010001FF,CN
    01000200,010003FF,CN
    01000400,010007FF,AU
    01000800,01000FFF,CN
    01001000,01001FFF,JP
    01002000,01003FFF,CN
    01004000,01007FFF,JP
    01008000,0100FFFF,TH
    I tried reversing it with
    Code:
    tpipe /input=iptocountry.hex /sort=0,1,0,1,8
    15 minutes later, it was still running, using all of one processor ("sort /r IpToCountry.hex" takes a couple seconds).

    When I tried to interrupt it with Ctrl-C, I got "tpipe.EXE has stopped working ...". I told Windows to "Close the program" ...

    ---------------------------
    Error
    ---------------------------
    Runtime error 217 at 00010524
    ---------------------------
    OK
    ---------------------------
  2. vefatica

    vefatica

    Messages:
    5,107
    Will TPIPE.EXE be linked to an internal TPIPE (like SHRALIAS.EXE) so it doesn't have to be in the path?
  3. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    No.
  4. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    Email me your file.
  5. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    There is something *very* strange about that file. TPIPE is actually sorting it, albeit very slowly (it took about 20 minutes on my system). I created a similar file that was about 3.5 Mb with 300,000 lines that sorts in 2.1 seconds, so I know it's not an issue with the file size or number of lines.

    I'll send the file to the textpipeengine.dll developers to test.
  6. vefatica

    vefatica

    Messages:
    5,107
    Did you look at the file's contents? It's hardly "strange". I made that file with TCC. The original (iptocountry.csv, link below) has the same number of lines, but with the IPs in non-dotted decimal numeric form. TPIPE /SORT chokes on it similarly.

    FYI:

    Code:
    copy "http://software77.net/geo-ip/?DL=2 -O /path/IpToCountry.csv.zip"
  7. vefatica

    vefatica

    Messages:
    5,107
    The crash when interrupting with Ctrl-C happens with all files (that give you a change to do so). Did you fix that?
  8. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    Not reproducible here.
  9. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    I did look (extensively) at the file's contents. The "strange" thing is that it chokes the sort routine, while a similar (larger) file does not.
  10. vefatica

    vefatica

    Messages:
    5,107
    Happens every time here, even on my TCMD.INI (but I must be very quick to press Ctrl-C).
  11. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    What does TCMD.INI have to do with ^C during TPIPE?
  12. vefatica

    vefatica

    Messages:
    5,107
    I was only pointing out that it happens with small files.
  13. vefatica

    vefatica

    Messages:
    5,107
    Does TPIPE have a global option (/tee?) to write to stdout as well as an output file?
  14. vefatica

    vefatica

    Messages:
    5,107
    These:
    Code:
    v:\> tpipe /?
    TPIPE: The system cannot find the file specified.
    "CON:"
     
    v:\> tpipe
    TPIPE: The system cannot find the file specified.
    "CON:"
    1. cause \aemail\datamystic.log to be created and written to
    2. should produce a more useful result
  15. Rod Savard

    Rod Savard

    Messages:
    299
    Noticed the aemail folder is still being created even with the latest public beta (15)
  16. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    No.
  17. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    WAD. I put it back in for the duration of the beta.

    Code:
    help tpipe
    produces a useful result. "tpipe /?" producing several pages of output (that you couldn't use anyway without referring to the help) would not be a useful result.
  18. vefatica

    vefatica

    Messages:
    5,107
    I agree; you're not going to get any useful TPIPE help in the console. But "TPIPE" and "TPIPE /?" producing an error message is equally useless. Users are going to do that. Let them give the brief message "try HELP TPIPE" or even take you directly to the help.
  19. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    I can do that, provided you don't mind TPIPE loading significantly slower (because it has to load Internet Explorer as well).
  20. vefatica

    vefatica

    Messages:
    5,107
    Well you know how I feel about speed. :)
    Must it load IE just to output the message "Try HELP TPIPE" and quit?
  21. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    No, but it must to display the TPIPE help page.
  22. vefatica

    vefatica

    Messages:
    5,107
    A simple message (other than an error message) would be fine with me.
  23. samintz

    samintz Scott Mintz

    Messages:
    870
    My vote would be to spit out the usage syntax with the comment to load the help for additional information.
    Code:
    TPIPE [/input=filename] [/output=filename] [/filter=filename] [/unicode=input,output]
    [/save=filename] [/simple=n[u]] [/eol=input,output,length]
    [/line=start,increment,skipblank,dontnumberblank,format] [/insert=position,type,string]
    [/head=Exclude,LinesOrBytes,Count] [/tail=Exclude,LinesOrBytes,Count] [/number=type,value]
    [/string=type,string] [/file=type,filename]
    [/dup=RemoveDuplicateLines,IgnoreCase,StartColumn,Length,IncludeOne] [/comment=text]
    [/log=LogFileName] [/run=InputFileName,OutputFileName,"CommandLine"] [/merge=type,filename]
    [/split=type,SplitSize,SplitChar,SplitCharPos,SplitCharCount,SplitLines,SplitFilename ]
    [/grep=Type,IncludeLineNumbers,IncludeFilename,IgnoreCase,CountMatches,UTF8,PatternType,Pattern]
    [/replace=Type,MatchCase,WholeWord,CaseReplace,PromptOnReplace,Extract,FirstOnly,SkipPromptIdentical,Action,SearchStr,ReplaceStr]
    [/xml=Type,IncludeText,IncludeQuotes,MatchCase,BufferSize,Tag,Attribute,EndTag]
     
    Type HELP TPIPE for additional detail
    
  24. Steve Fabian

    Steve Fabian

    Messages:
    3,531
    I like Scott's suggestion.
  25. JohnQSmith

    JohnQSmith

    Messages:
    446
    Me too. After using TPIPE for a while, people will become more familiar with it but will still need the occasional pointer. I much prefer a command summary and a "go see the help" instead of just "go see the help".
  26. vefatica

    vefatica

    Messages:
    5,107
    TPIPE is a very complicated command. I suspect most will need to be looking at its detailed help every time the use it (for quite a while). The best solution might be something like NETSH's help ...

    Code:
    TPIPE /GREP /? (et c.)
    but I wouldn't blame Rex for not wanting to go there. :-)

    Also ... TPIPE should have a /CUT option (filter text by column/field). I couldn't do without CUT.EXE
  27. JRohde

    JRohde

    Messages:
    17
    Heh. That's why I can't run tpipe. Good to know. I assumed it was spec'd and documented, but perhaps had not been finished yet, and that's why I wasn't seeing it. I suppose it's alias time.

    Soooo.... What's the deal with DEBUGMONITOR then? That's the main reason I upgraded (the other stuff is way cool, don't get me wrong).
  28. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    That's incomprehensible to me -- do you often say "Darn, I know my options are 1,4,22,8,0,1, but I just can't remember what the switch name is?"
  29. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    There's a typo ("DEBBUGMONITOR") in the command list. It's been fixed for build 16.
  30. rconn

    rconn Administrator Staff Member

    Messages:
    6,728
    TPIPE can already do that.

Share This Page