Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14
Do you want to first add a row number to each line, then sort, then fold the identical lines? so, if your starting data is: AAAAA BBBBB AAAAA VFVDS AAAAA ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Jan 2008
    Posts
    28

    Do you want to first add a row number to each line, then sort, then fold the identical lines?

    so, if your starting data is:
    AAAAA
    BBBBB
    AAAAA
    VFVDS
    AAAAA

    then you'd first transform it to:
    AAAAA|1
    BBBBB|2
    AAAAA|3
    VFVDS|4
    AAAAA|5

    Then you'd sort it to:
    AAAAA|1
    AAAAA|3
    AAAAA|5
    BBBBB|2
    VFVDS|4

    Then you'd fold it to:
    AAAAA|1|3|5
    BBBBB|2
    VFVDS|4

    Is that the process you are looking for?

  2. #12
    Linux Newbie Syndacate's Avatar
    Join Date
    May 2012
    Location
    Hell..no literally, this state is hell..
    Posts
    192
    Quote Originally Posted by Dustspeck View Post
    Do you want to first add a row number to each line, then sort, then fold the identical lines?

    so, if your starting data is:
    AAAAA
    BBBBB
    AAAAA
    VFVDS
    AAAAA

    then you'd first transform it to:
    AAAAA|1
    BBBBB|2
    AAAAA|3
    VFVDS|4
    AAAAA|5

    Then you'd sort it to:
    AAAAA|1
    AAAAA|3
    AAAAA|5
    BBBBB|2
    VFVDS|4

    Then you'd fold it to:
    AAAAA|1|3|5
    BBBBB|2
    VFVDS|4

    Is that the process you are looking for?
    ^ Essentially huffman encoding, eh? I myself am confused to piss by the question.

  3. #13
    Just Joined!
    Join Date
    Jan 2008
    Posts
    28
    Quote Originally Posted by Syndacate View Post
    ^ Essentially huffman encoding, eh? I myself am confused to piss by the question.
    While it may appear to be Huffman Coding, we don't deal with actual compression of the symbols or likelyhood of the appearance of the symbols. This is more like a linked database with the symbol as a primary key.

    I am not entirely clear, either. I hope the OP let's us know if my description is accurate.

  4. #14
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,738
    Quote Originally Posted by papori View Post
    Do you have any recommendation for a free linux tool?
    Have a look at this lessfs | Open source data de-duplication
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •