TPIPE?

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

  1. rconn Administrator

    Message Count:
    5,803
    No, but it must to display the TPIPE help page.
  2. vefatica

    Message Count:
    3,910
    A simple message (other than an error message) would be fine with me.
  3. samintz Scott Mintz

    Message Count:
    749
    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
    
  4. Steve Fabian

    Message Count:
    2,718
    I like Scott's suggestion.
  5. JohnQSmith

    Message Count:
    363
    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".
  6. vefatica

    Message Count:
    3,910
    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
  7. JRohde

    Message Count:
    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).
  8. rconn Administrator

    Message Count:
    5,803
    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?"
  9. rconn Administrator

    Message Count:
    5,803
    There's a typo ("DEBBUGMONITOR") in the command list. It's been fixed for build 16.
  10. rconn Administrator

    Message Count:
    5,803
    TPIPE can already do that.
  11. vefatica

    Message Count:
    3,910
    How do I do this with TPIPE ... extract the 5th space-delimited field from each line?
    Code:
    v:\> tail w32tm.log
    2012-05-13 Sun 03:17:01 Correction: +0.015 s  RTT:  61 ms
    2012-05-14 Mon 03:17:01 Correction: +0.038 s  RTT:  63 ms
    2012-05-15 Tue 03:17:01 Correction: +0.002 s  RTT:  61 ms
    2012-05-16 Wed 03:17:01 Correction: -0.003 s  RTT:  60 ms
    2012-05-17 Thu 00:08:03 Correction: -0.695 s  RTT:  55 ms
    2012-05-17 Thu 03:17:00 Correction: +0.010 s  RTT:  70 ms
    2012-05-18 Fri 03:17:01 Correction: +0.037 s  RTT:  61 ms
    2012-05-19 Sat 03:17:01 Correction: -0.113 s  RTT:  55 ms
    2012-05-20 Sun 03:17:01 Correction: +0.048 s  RTT:  89 ms
    2012-05-21 Mon 03:17:01 Correction: +0.006 s  RTT:  63 ms
     
    v:\> tail w32tm.log | cut -d" " -f5
    +0.015
    +0.038
    +0.002
    -0.003
    -0.695
    +0.010
    +0.037
    -0.113
    +0.048
    +0.006
  12. Stefano Piccardi

    Message Count:
    348
    +1 and the other question stands for me, how can you cut by column position using TPIPE?
  13. JohnQSmith

    Message Count:
    363
    Code:
    tail w32tm.log | cut -d" " -f5 | tpipe /grep=2,0,0,0,0,0,0,0,.*
    +0.015
    +0.038
    +0.002
    -0.003
    -0.695
    +0.010
    +0.037
    -0.113
    +0.048
    +0.006

    HAHAHAHAHA!!! I crack myself up!

    Sorry... couldn't resist.

    But seriously, I don't see it in the documentation other than some convoluted /grep regex.
  14. JohnQSmith

    Message Count:
    363
    You could also use AWK
    Code:
    tail w32tm.log | gawk "{print $5}"
    +0.015
    +0.038
    +0.002
    -0.003
    -0.695
    +0.010
    +0.037
    -0.113
    +0.048
    +0.006
  15. rconn Administrator

    Message Count:
    5,803
    Use the /selection filter.
  16. rconn Administrator

    Message Count:
    5,803
    Use the /selection filter.
  17. vefatica

    Message Count:
    3,910
    I'd like to try it but it's not described in the help.
    The quick (command line) help for TPIPE has no newlines in it (on purpose?). It's very hard to read.
    What's the status of /sort? Did you hear from the developers about that screwy file?
  18. rconn Administrator

    Message Count:
    5,803
    Build 18 didn't get the updated help file due to a crash in the help compiler. It's been fixed for build 19.

    The quick help has no newlines in it because if it did, it would be even harder to read because it wouldn't fit on one (or two) screen pages. Remember, I *did* warn everyone clamoring for the TPIPE quick help that it wouldn't be of the slightest benefit ...

    /sort has been removed and will not be in the initial v14 release.
  19. vefatica

    Message Count:
    3,910
    I tried for about 40 minutes and could only get "the parameter is incorrect". How do get from here:

    Code:
    c:\users\vefatica\appdata\roaming\jp software> ffind /m /s tcmd.msi
    C:\Users\vefatica\AppData\Roaming\JP Software\Take Command 13.04 13.04.53\install\B321F08\tcmd.msi
    C:\Users\vefatica\AppData\Roaming\JP Software\Take Command 13.04 13.04.54\install\6CDFEDC\tcmd.msi
    (snip)
    to here

    Code:
    c:\users\vefatica\appdata\roaming\jp software> ffind /m /s tcmd.msi | g:\gnu\cut -f9 -d \
    B321F08
    6CDFEDC
    (snip)
    with TPIPE? I want to see the 9th \-delimited field.

    And maybe someone will tell me what all this means.
    Code:
    /selection=Type,Locate,Param1,Param2,MoveTo,nDelimiter,CustomDelimiter,HasHeader
    Type - The type of filter to add:
    0 - Delete column
    6 - Remove lines
    7 - Remove delimited fields (CSV, Tab, Pipe, etc.)
    9 - Move columns
    10 - Move delimited fields (CSV, Tab, Pipe, etc.)
    12 - Copy columns
    13 - Copy delimited fields (CSV, Tab, Pipe, etc.)
    17 - Remove byte range
     
    Locate method - How to determine which areas to affect
    0 - Restrict %d .. %d
    1 - Restrict %1:d starting at %0:d
    2 - Restrict %1:d starting at END - %0:d
    3 - Restrict %d .. END - %d
    4 - Restrict END - %d .. END - %d
     
    Param1, Param2 - The integer values for the locate method
     
    MoveTo - the integer value where to move or copy the columns or fields to (first columns or field is 1).
    
  20. vefatica

    Message Count:
    3,910
    Here's a simpler one. How do I do this with TPIPE?

    Code:
    v:\> echo My\dog\has\fleas. | g:\gnu\cut -d \ -f2
    dog

Share This Page