• separate only duplicate numbers from file

    Locked
    6
    0 Votes
    6 Posts
    4k Views
    Jim DaileyJ

    Here’s an AWK script that can do the trick for you:

    # If there is something other than whitespace on a line: NF { # Use the text as an array index and count how many times it appears Line[$0]++ } # Once the whole file is done, spit out every line that was duplicated 2 or more # times, the number of times they were duplcated. # # If Line[line] == 1, then the line appeared only 1 time (it is unique). # If Line[line] > 1, then the line appeared that many times. END { for (line in Line) { for (i = 1; Line[line] > 1 && i <= Line[line]; i++) { print line } } }

    I use GNU AWK for windows (gawk.exe). If you save the script as dup.awk, then:

    gawk -f .\dup.awk <name of your 90000 line file> > dupout.txt

    will create dupout.txt with all the duplicated lines. I used the data in your original post and let the output go to standard out:

    C:\temp\awk>type input.txt 919913209647 02:38:47 919979418778 02:57:03 918980055979 02:46:12 919428616318 02:46:32 919512672560 02:46:33 919512646084 02:46:52 919512497164 02:48:13 919512497164 02:48:13 919913029225 02:50:23 917567814941 03:02:35 919537722335 03:18:41 918980299814 03:24:49 919727009323 03:29:44 C:\temp\awk>gawk -f .\dup.awk input.txt 919512497164 02:48:13 919512497164 02:48:13 C:\temp\awk>
  • Python PEP8 syntax warnings

    Locked
    7
    0 Votes
    7 Posts
    8k Views
    Scott SumnerS

    For the record, when I read something like the OP’s question, I presume that they have done their due diligence and have explored external options and have a good reason for wanting to do what they are asking about, inside Notepad++. Not always a good presumption, I guess, but this is a N++ forum, after all. :)

  • Drag-and-drop files not working in latest version 6.9

    12
    0 Votes
    12 Posts
    11k Views
    AxaZolA

    Seriously… 6 months is past and still no changes ? WTF !??

  • Custom Keyword highlighting

    8
    0 Votes
    8 Posts
    8k Views
    Claudia FrankC

    Hello Hans,

    sorry, unfortunately I didn’t find a reliable way to style text while a lexer is active.

    Cheers
    Claudia

  • How do I place a recorded macro back to the "Play" button?

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @Me-andmi

    sorry, afaik there is no way currently to reassign it.
    Do you know that you can assign shortcuts to the macro or
    that you can put the macros into the context menu? Maybe a useful workaround?

    Cheers
    Claudia

  • Very simple regex question

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    dailD

    how would I eliminate “I” from ([A-Z])

    [A-HJ-Z]

    This is probably the most straight forward way of doing it.

  • Guessing Answer is No.... Can Notepad++ Vlookup?

    Locked
    5
    0 Votes
    5 Posts
    7k Views
    Felix AF

    Since it can be made to look at 2 different files with the compare plugin and even to run sql queries, I’m a little surprised that it wouldn’t be easier. The ultimate solution (at least for my set up) would be a parser in PHP. I’ll get there but until then, Notepad++ has done wonders on the desktop. At least now I know not to look for this functionality based on your comment. You’ve saved me lots of time b/c I won’t go looking for ways to accomplish this in Notepad++. I hear you when you say it’s technically possible but not advisable. Thanks!

  • numbers become letters and stuff

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Martin TybergM

    Fixed it

  • 0 Votes
    10 Posts
    8k Views
    Felix AF

    Hi Guy, just curious if there is an easy way to make the regex flexible where it can to the insertion of the text on all lines be there 3, 6, or a 100?

  • Cancel adding installation

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    dailD

    Which plugins is pending to install

    Not sure exactly. There are a few plugins that need admin rights, such as PythonScript, XMLTools, and possibly a couple others. You may be able to find out if you take a look at the file I mention below…

    How can I cancel that installation.

    There should be a file somewhere called PluginManagerGpup.xml. If you delete that then you should be fine. Not sure where that will be stored exactly (maybe %APPDATA%?) since you are running a portable version.

  • how can i save tsv document on notepad ++?

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Google feature? But there is nothing.

    12
    0 Votes
    12 Posts
    9k Views
    Almir CanellaA

    @Claudia-Frank Thank you, I Hadn’t. I had one for older build backup of shortcuts.xml and some problems because of that. Now it works! Appreciated!

  • Folding based on Indent?

    Locked
    2
    1 Votes
    2 Posts
    9k Views
    Bortre IkariamB

    Hi. I found your post as I was googling for the same thing. I read on Stack Overflow that it can’t be done. It does it for Python and YAML thanks to Scintilla, which is the editor used within Notepad++ and which recognizes those two languages.

    http://stackoverflow.com/questions/7246004/configure-notepad-to-use-indentation-based-code-folding

    I’m using indentation to describe a complex array in PHP. For my purposes, the Python style works ok. On my computer, the YAML language makes all the text red. I hope one of the two works for you.

  • Launch in Edge

    6
    0 Votes
    6 Posts
    5k Views
    Scott SumnerS

    So “Edge” is the now the new tool you use exactly one time: To install a REAL browser that you will use from then on…

    SORRY…had to.

    Ok, so you just can’t blindly follow instructions all the time…what if those instructions are wrong? Again, I don’t want to get involved with Edge-specifics, but the Firefox line has “firefox” in front of FULL_CURRENT_PATH…which makes sense, you want to invoke Firefox and pass it the path of the document being edited in Notepad++. The Edge line in your screenshot has the document path BEFORE anything related to Edge, which doesn’t seem right to me. But…before I become too wrong here, I’ll bow out…

  • Trouble Adding UserDefinedLanguage Parser to NotePad++ v6.8.2

    6
    0 Votes
    6 Posts
    5k Views
    MAPJe71M

    Try the following FunctionList association & parser and make sure you have the UDL defined. The UDL can be ‘empty’ i.e. only name (EasyLanguage) and extension (eltxt, no leading dot) defined.

    <association ext=".eltxt" userDefinedLangName="EasyLanguage" id="ts_easylang" /> <parser id ="ts_easylang" displayName="EasyLanguage" commentExpr="({[^{}]*?})|(//.*?$)" > <function mainExpr="(?i)METHOD\s+(?-i:void|double|bool|int)\s+(?'NAME'\w+)\s*(?'ARGS'\([^()]*\))(?:\r?\n|\r)" > <functionName> <nameExpr expr="(?i)METHOD\s+\K[^)]+\)" /> <!-- comment out the following node to display the method with its parameters --> <nameExpr expr="[^(]+" /> </functionName> </function> </parser>
  • Bug when regex matches start and replacing with a blank

    4
    0 Votes
    4 Posts
    3k Views
    Scott SumnerS

    I had to get used to Notepad++ regex behavior when I first started using it, too. If you care to read something about that, have a look at “point #3” references in this thread:

    https://notepad-plus-plus.org/community/topic/137/select-by-columns

  • Is it planned to switch to PCRE2?

    16
    0 Votes
    16 Posts
    19k Views
    MAPJe71M

    I like using regular expressions.

    For me the biggest problem is the amount of different engines that have their own expression syntax. Yes, that includes the one’s that claim to be Perl compatible. IMO compatible in most cases means sharing some, re-interpreting some and extending some of the syntax instead of just extending the syntax. As a result the RE’s successfully used with one RE engine do not work with another RE engine (unless the RE’s are very-very basic).

    So at some moment you think: “I know RE’s, I can do this.” and then it appears you don’t :)

  • Add Notepad++ to list of HTML Editors in Internet Explorer

    3
    0 Votes
    3 Posts
    3k Views
    Ddi PtD

    @Dylan-Yarbrough
    Installer with 6.8.8 has this ability.
    All installers 6.9 and up are missing this option. I, personally, using 6.8.8 on new windows installation.

  • UDL - Custom Language with multiple languages nested

    2
    0 Votes
    2 Posts
    3k Views
    Claudia FrankC

    @Orion-Admin

    a long post, but unfortunately there is a short answer.
    The way you want to have it work cannot be achieved with UDL.

    The first misunderstanding is, that you can define keywords which only
    get colored when surrounded by delimiter. This isn’t the case, keywords get
    colored when found.

    Next, you cannot define delimiters which are subsets of other delimiters.

    Sorry, either you redefine your requirements or you need to use a different approach
    like writing your own lexer (can even be done with python or lua script plugins).

    The documentation about UDL is here.

    Cheers
    Claudia

  • Who is the default theme font-family?

    2
    0 Votes
    2 Posts
    5k Views
    Claudia FrankC

    @Ивайло-Костов

    the default font is Courier New -> font size 10
    but there is no guarantee that this font looks the same on each os/desktop …

    Cheers
    Claudia