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

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    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
    ---------------------------
     
    #1
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    Will TPIPE.EXE be linked to an internal TPIPE (like SHRALIAS.EXE) so it doesn't have to be in the path?
     
    #2
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    No.
     
    #3
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    Email me your file.
     
    #4
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    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.
     
    #5
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    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"
     
    #6
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    The crash when interrupting with Ctrl-C happens with all files (that give you a change to do so). Did you fix that?
     
    #7
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    Not reproducible here.
     
    #8
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    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.
     
    #9
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    Happens every time here, even on my TCMD.INI (but I must be very quick to press Ctrl-C).
     
    #10
  11. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    What does TCMD.INI have to do with ^C during TPIPE?
     
    #11
  12. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    I was only pointing out that it happens with small files.
     
    #12
  13. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    Does TPIPE have a global option (/tee?) to write to stdout as well as an output file?
     
    #13
  14. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    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
     
    #14
  15. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    347
    Likes Received:
    1
    Noticed the aemail folder is still being created even with the latest public beta (15)
     
    #15
  16. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    No.
     
    #16
  17. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    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.
     
    #17
  18. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    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.
     
    #18
  19. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    I can do that, provided you don't mind TPIPE loading significantly slower (because it has to load Internet Explorer as well).
     
    #19
  20. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    Well you know how I feel about speed. :)
    Must it load IE just to output the message "Try HELP TPIPE" and quit?
     
    #20
  21. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    No, but it must to display the TPIPE help page.
     
    #21
  22. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    A simple message (other than an error message) would be fine with me.
     
    #22
  23. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    904
    Likes Received:
    4
    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
    
     
    #23
  24. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,531
    Likes Received:
    4
    I like Scott's suggestion.
     
    #24
  25. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    450
    Likes Received:
    3
    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".
     
    #25
  26. vefatica

    Joined:
    May 20, 2008
    Messages:
    5,664
    Likes Received:
    11
    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
     
    #26
  27. JRohde

    Joined:
    Sep 1, 2008
    Messages:
    17
    Likes Received:
    0
    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).
     
    #27
  28. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    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?"
     
    #28
  29. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    There's a typo ("DEBBUGMONITOR") in the command list. It's been fixed for build 16.
     
    #29
  30. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    7,420
    Likes Received:
    27
    TPIPE can already do that.
     
    #30

Share This Page