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

tpipe questions

Discussion in 'Support' started by Charles G, Apr 28, 2013.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,025
    Likes Received:
    0
    TCC 15.01.40 x64 Windows 7 [Version 6.1.7601]
    TCC Build 40 Windows 7 Build 7601 Service Pack 1
    Registered to Charles S Galloway - 5 System License
    I would like to remove duplicates from a file -

    TPIPE /input=input.txt /output=output.txt /dup=

    For the /DUP I am not clear about the :

    Length and IncludeOne verbs or whatever they are called. I would like to remove duplicates based on the length of each line.....

    ===========================================================

    /split=2,

    Since I want to split based on number of lines = the the file size to split at, the charachter to split at, splitchatpos, splitcharcount - they would not have valuses so:

    /Split=2,,,,%@eval[%@lines[all.all] / 4]

    would give me all.all.000 to all.all.003 and they would contain all the lines of all.all.

    ============================================================

    Also be great is tpipe would have a sort filter....
    ===========================================================

    thank you in advance...
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,863
    Likes Received:
    83
    I don't know what you mean by "based on the length of each line". The Length option just specifies the number of characters you want to compare; you cannot compare based solely on the length of the line (at least, not with the /DUP option).
     
  3. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,025
    Likes Received:
    0
    I meant I want to compare on the whole line.....
     
  4. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Code:
    /dup=0,1,0,99999,0
    or in English
    Code:
    /dup=RemoveDups,CaseSensitive,StartAtZeroColumn,Match99999CharactersOnTheLine,DontIncludeLinesOfCount1
    You may need to adjust the 99999 depending if you have lines longer than that.
     
  5. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,025
    Likes Received:
    0
    I think I am doing the /split operation correctly?

    [C:\TCMD\AFT]tpipe /input=all.txt /log=tpipe.log /split=2,,,,,%@eval[( %@lines[all.txt] / 2) + 1]
    TPIPE: The parameter is incorrect.
    "/split=2,,,,,13280246.5"

    [C:\TCMD\AFT]tpipe /input=all.txt /log=tpipe.log /split=2,,,,,%@int[%@eval[( %@lines[all.txt] / 4) + 1]]
    TPIPE: The parameter is incorrect.
    "/split=2,,,,,6640123"

    [C:\TCMD\AFT]tpipe /input=all.txt /log=tpipe.log /split=2,,,,,%@int[%@eval[( %@lines[all.txt] / 4) + 1]],
    TPIPE: The parameter is incorrect.
    "/split=2,,,,,6640123,"
     
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    It would seem you can't give empty arguments. This worked:
    Code:
    tpipe /input=12345.txt /split=2,0,0,0,0,5
    And this didn't:
    Code:
    tpipe /input=12345.txt /split=2,,,,,5
    It also seems, at least in many cases, you must supply **meaningful** data for args that aren't used. For example, putting a non-numeric string where a number is expected (even if not used) causes an error.
     

Share This Page