• Login
Community
  • Login

Remove Duplicate Lines

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
8 Posts 4 Posters 915 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H
    hasan123
    last edited by Jan 6, 2020, 6:58 PM

    Hi,
    Is this possible to remove duplicate lines in a text file/list with Notepad++ ?

    To change this:

    aaaaaaaaaaaa
    bbbbbbbbbbbb
    aaaaaaaaaaaa
    aaaaaaaaaaaa
    cccccccccccc
    dddddddddddd
    eeeeeeeeeeee
    ffffffffffff
    cccccccccccc
    gggggggggggg
    hhhhhhhhhhhh
    gggggggggggg
    gggggggggggg
    cccccccccccc
    

    To

    aaaaaaaaaaaa
    bbbbbbbbbbbb
    cccccccccccc
    dddddddddddd
    eeeeeeeeeeee
    ffffffffffff
    gggggggggggg
    hhhhhhhhhhhh
    
    A 1 Reply Last reply Jan 6, 2020, 7:17 PM Reply Quote 0
    • A
      Alan Kilborn @hasan123
      last edited by Jan 6, 2020, 7:17 PM

      @hasan123

      Maybe. Key question: Can your lines be sorted without losing meaning?

      H 1 Reply Last reply Jan 6, 2020, 7:23 PM Reply Quote 3
      • H
        hasan123 @Alan Kilborn
        last edited by Jan 6, 2020, 7:23 PM

        @Alan-Kilborn

        Sorting is not important for my case.

        A 1 Reply Last reply Jan 6, 2020, 7:28 PM Reply Quote 1
        • A
          Alan Kilborn @hasan123
          last edited by Jan 6, 2020, 7:28 PM

          @hasan123

          Then your best option is to sort the lines using one of the Sort commands, then use the Remove Consecutive Duplicate Lines command. All are on the Edit > Line Operations menu.

          H 1 Reply Last reply Jan 6, 2020, 7:36 PM Reply Quote 3
          • H
            hasan123 @Alan Kilborn
            last edited by Jan 6, 2020, 7:36 PM

            @Alan-Kilborn

            Yes, Thanks for the info.

            1 Reply Last reply Reply Quote 1
            • R
              rinku singh
              last edited by Jan 7, 2020, 2:29 AM

              Use Remove Duplicate Lines plugin

              https://youtu.be/OP_VqD7lCGw

              1 Reply Last reply Reply Quote 0
              • P
                Prahlad-Makwana4145
                last edited by Jan 7, 2020, 7:00 AM

                Hello, @hasan123

                Based on your problem please follow steps to remove duplicate lines with notepad++.

                Note :- Notepad++ is a feature rich text editor but does not have an integrated feature to remove duplicate lines, however, the option can be added in via the external plugin system Notepad++ uses. Although some are already included the TextFX plugin is not installed by default and needs to be added manually.

                Step 1:- Go to the Plugins menu.
                Step 2:- In plugins menu select Plugin Manager > Show Plugin Manager.
                Step 3:- Find the TextFX Characters plugin from the list.
                Step 4:- Check the box, click Install and restart the program.
                Step 5:- After installation, select all the text (Ctrl+A), go to TextFX > TextFX Tools and select the option +Sort outputs only UNIQUE (at column) lines.
                Step 6:- Go back to the same TextFX Tools menu and either click on Sort lines case sensitive (at column) or Sort lines case insensitive (at column). This will remove the duplicate lines.

                I hope above information will be useful for you.
                Thank you.

                A 1 Reply Last reply Jan 7, 2020, 1:10 PM Reply Quote 0
                • A
                  Alan Kilborn @Prahlad-Makwana4145
                  last edited by Jan 7, 2020, 1:10 PM

                  @Prahlad-Makwana4145

                  I would not advise people to use the TextFX plugin as it is old and support is questionable.

                  1 Reply Last reply Reply Quote 0
                  4 out of 8
                  • First post
                    4/8
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors