Community
    • Login

    I need to line up the lines of text from two files in a certain sequence.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 398 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.
    • BlackLone WolfB Offline
      BlackLone Wolf
      last edited by BlackLone Wolf

      Hello.
      I have two files of text - one in a foreign language and one in a native language.
      Document 1
      a
      a
      a
      Document 2
      1
      1
      1
      1
      I need it like this:
      Final result
      a
      1
      a
      1
      a
      1
      Documents have the same number of lines of text
      Thx for help in advance.

      Alan KilbornA astrosofistaA 2 Replies Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @BlackLone Wolf
        last edited by

        @BlackLone-Wolf

        You could use the column-editor (Alt+c) to prefix incrementing numbers onto the start of each line.

        In doc 1, use odd numbers: 1,3,5… with leading zeros appropriate for your data. In doc 2, use even numbers: 2,4,6…

        Then copy both docs into a new doc, doc 3.

        Sort doc3 using an integer-ascending sort.

        Finally, remove the prefixes you added by column-selecting them and then delete.

        Your final results will then be in doc 3.

        (That was rather brief, so if you need more help than that, post again.)

        1 Reply Last reply Reply Quote 3
        • astrosofistaA Offline
          astrosofista @BlackLone Wolf
          last edited by

          Hi @BlackLone-Wolf

          Take a look at this thread, where you will find different ways to deal with this issue.

          Have fun!

          1 Reply Last reply Reply Quote 3

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors