@inkognito said in Remove "duplicate" lines based on only a specific part of the line:
How can I apply it to the text file without opening it in Notepad++?
Are there any corresponding options over the command line?
Two very leading but somewhat loosely defined questions.
Find in Files allows you to select a number of files based on filters, such as folders (and hidden & sub-folders), file type, partial filename. So the files are edited by Notepad++ (NPP) but don’t show in the NPP view(s). You could say they aren’t opened by NPP if you mean “do I see them in the NPP view”.
I am aware that there is the ability to have an “auto start” functionality upon loading NPP. The information is in the FAQ section here. So it uses the PythonScript plugin along with an “auto-start” script file called “startup.py”. Upon NPP loading it immediately starts processing the commands in this script file.
There is another PlugIn called NppExec and a post late last year suggested it might have a method on autostarting once NPP is loaded, see post #26006. Unfortunately there isn’t a lot else I have seen on NppExec, it doesn’t tend to get much exposure.
If you are referring to editing these files without NPP itself loading, then that is a whole other question which resides outside of this forum. Other command line editors such as AWK, SED, GREP etc might offer you that functionality but as I say that is not for this forum to answer. You would need to visit forums based on which ever editor you wish to use. The regular expression I provided might work as is in another editor, but likely would require some massaging to perform correctly.
Terry