Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Clip] Digest Number 1245

Expand Messages
  • Robin Garr
    ... Thanks, Larry! This is great, and as Felix P says, you are incredibly generous with your help. Now, however, I really feel stupid: I framed the question
    Message 1 of 6 , Jun 21, 2004
      >The clip below will remove both duplicated lines assuming that you want
      >both double lines removed and not just one of them. If there are three or
      >more duplicated lines to be removed, the clip will not work properly. It
      >is written to only remove dupliclates not triplicates, quadruplicates, etc.

      Thanks, Larry! This is great, and as Felix P says, you are incredibly
      generous with your help.

      Now, however, I really feel stupid: I framed the question poorly and got a
      great answer that doesn't quite fit what I MEANT to ask.

      I looked over the script but don't quite have the programming chops to
      figure how to alter it, so if I may, let me prevail on your generosity one
      more time. What I REALLY need is this:

      1. Look at the list I previously described, containing an alphanumerically
      sorted list that includes some single entries, some double entries and
      possibly some multiple entries (more than two).

      2. Remove the single entries.

      3. Remove the extra multiple entries.

      4. In other words, end up with one instance (only) of the entries that
      appeared two or more times on the original list, while eliminating the
      singletons.

      Actually, if it's easier, I could easily work with a script that merely
      removes the singletons while leaving the duplicates and triplicates alone,
      after which I could simply use NTP to sort the remaining list of multiples
      while removing duplicates.

      Thanks again!

      RG




      [Non-text portions of this message have been removed]
    • hsavage
      ... three or ... properly. It ... quadruplicates, etc. ... got a ... generosity one ... alphanumerically ... alone, ... multiples ... RG, I ve, also, been
      Message 2 of 6 , Jun 21, 2004
        Robin Garr wrote:

        >> The clip below will remove both duplicated lines assuming that you want
        >> both double lines removed and not just one of them. If there are
        three or
        >> more duplicated lines to be removed, the clip will not work
        properly. It
        >> is written to only remove dupliclates not triplicates,
        quadruplicates, etc.
        >
        >
        > Thanks, Larry! This is great, and as Felix P says, you are incredibly
        > generous with your help.
        >
        > Now, however, I really feel stupid: I framed the question poorly and
        got a
        > great answer that doesn't quite fit what I MEANT to ask.
        >
        > I looked over the script but don't quite have the programming chops to
        > figure how to alter it, so if I may, let me prevail on your
        generosity one
        > more time. What I REALLY need is this:
        >
        > 1. Look at the list I previously described, containing an
        alphanumerically
        > sorted list that includes some single entries, some double entries and
        > possibly some multiple entries (more than two).
        >
        > 2. Remove the single entries.
        >
        > 3. Remove the extra multiple entries.
        >
        > 4. In other words, end up with one instance (only) of the entries that
        > appeared two or more times on the original list, while eliminating the
        > singletons.
        >
        > Actually, if it's easier, I could easily work with a script that merely
        > removes the singletons while leaving the duplicates and triplicates
        alone,
        > after which I could simply use NTP to sort the remaining list of
        multiples
        > while removing duplicates.
        >
        > Thanks again!
        >
        > RG

        RG,

        I've, also, been following this thread and for the sake of more clarity
        is the following example what you are searching for?

        I believe this is your original list.

        1223
        1224
        1227
        1227
        12356
        12356
        12359

        And, you are wanting to remove all singles, then remove dupes from
        what's left, like this?

        1227
        12356

        Am I close?

        hrs
      • Larry Thomas
        Hi Robin, ... Here is the clip that I wrote for you: ______[Copy below this line]_______ H= Remove Single Lines ;lrt@nospamplease.net e¿ê ;06/21/2004,
        Message 3 of 6 , Jun 21, 2004
          Hi Robin,

          At 08:21 AM 6/21/04 -0400, you wrote:
          >
          >Thanks, Larry! This is great, and as Felix P says, you are incredibly
          >generous with your help.
          >
          >Now, however, I really feel stupid: I framed the question poorly and got a
          >great answer that doesn't quite fit what I MEANT to ask.
          >
          >I looked over the script but don't quite have the programming chops to
          >figure how to alter it, so if I may, let me prevail on your generosity one
          >more time. What I REALLY need is this:
          >
          >1. Look at the list I previously described, containing an alphanumerically
          >sorted list that includes some single entries, some double entries and
          >possibly some multiple entries (more than two).
          >
          >2. Remove the single entries.
          >
          >3. Remove the extra multiple entries.
          >
          >4. In other words, end up with one instance (only) of the entries that
          >appeared two or more times on the original list, while eliminating the
          >singletons.
          >
          >Actually, if it's easier, I could easily work with a script that merely
          >removes the singletons while leaving the duplicates and triplicates alone,
          >after which I could simply use NTP to sort the remaining list of multiples
          >while removing duplicates.

          Here is the clip that I wrote for you:

          ______[Copy below this line]_______
          H="Remove Single Lines"
          ;lrt@... e¿ê
          ;06/21/2004, 09:20:50 AM
          ^!Jump 1
          :Loop
          ^!If ^$Getline$ = ^$Getline(+1)$ Skip_3
          ^!Deleteline
          ^!If ^$GetLineCount$ = ^$Getrow$ LastLine
          ^!Goto Loop
          ^!Deleteline
          ^!Jump +1
          ^!If ^$GetLineCount$ = ^$Getrow$ LastLine
          ^!Goto Loop
          :LastLine
          ^!Deleteline
          _____[Copy above this line]______
          | right click over the clipbook |
          | and choose "Add from Clipboard" |
          ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

          It also removes all but one of multiple lines. It will leave one copy of
          any line that is duplicated one or more times in sequence. I tried it on
          the list below:

          1223
          1223
          1224
          1227
          1227
          12356
          12356
          12359
          12360
          12366
          12366
          12366
          12367
          12367
          12368

          And after I ran the clip, I ended up with:

          1223
          1227
          12356
          12366
          12367

          I hope that this is what you want.

          Regards,

          Larry
          lrt@... e¿ê
        • Hugo Paulissen
          Hi Robin, Harvey, Larry... I have a clip as well, it eliminates all double entries. I do not have the time to change it now, but I can imagine that if you
          Message 4 of 6 , Jun 21, 2004
            Hi Robin, Harvey, Larry...

            I have a clip as well, it eliminates all double entries. I do not
            have the time to change it now, but I can imagine that if you change
            the number after the stringCount (and maybe you have to change the
            order of REMOVELINE and NEXTLINE as well) you can adapt this clip to
            do what you really want.

            Hugo

            ^!Set %ALL%=^$GetTEXT$
            ^!Set %LineNr%=0
            :GETLINE
            ^!INC %LineNr%
            ^!If ^%LineNr%>^$GetLineCount$ END
            ^!Set %LINE%=^$GetLine(^%LineNr%)$
            ^!IF ^$strCount("^%LINE%";"^%ALL%";0;0)$<1 REMOVELINE NEXTLINE
            :REMOVELINE
            ^!Set %ALL%=^$strReplace(^%LINE%^%NL%;"";^%ALL%;0;0)$
            :NEXTLINE
            ^!GoTo GETLINE
            :END
            ^!Select ALL
            ^!InsertText ^%ALL%
          • rgarr01
            ... Perfect! Thanks again, Larry. You re my NTP hero! :-)
            Message 5 of 6 , Jun 21, 2004
              --- In ntb-clips@yahoogroups.com, Larry Thomas <larryt@c...> wrote:

              > And after I ran the clip, I ended up with:
              >
              > 1223
              > 1227
              > 12356
              > 12366
              > 12367
              >
              > I hope that this is what you want.

              Perfect! Thanks again, Larry. You're my NTP hero! :-)
            • rgarr01
              ... Close? You rang the gong! As it turns out, Larry came up with a script that s perfect, so the problem is solved. But many thanks for following up.
              Message 6 of 6 , Jun 21, 2004
                --- In ntb-clips@yahoogroups.com, hsavage <hsavage@p...> wrote:

                > Am I close?

                Close? You rang the gong! As it turns out, Larry came up with a
                script that's perfect, so the problem is solved. But many thanks for
                following up.
              Your message has been successfully submitted and would be delivered to recipients shortly.