I'm looking for combine plugin - merge

I set up Notepad++ and searched for combine plugin but i didn't find it, should i set up another version of Notepad++ and what version may contain the combine plugin please

It appears that Combine does not work with the 64-bit version of NotePad++. That is the reason it is not listed in the Plugin Manager.
Install the 32-bit version and it will be there.

I know this has nothing to do with Notepad++, but consider a different way to achieve the same result.
Open your command prompt.
Navigate to the folder that contains your files. Multiple ways to do just that
Use the type command:
C:\> type 1.txt 2.txt > 3.txt
This command will combine the contents of 1.txt and 2.txt into 3.txt.

Related

Jboss CLI Command to list the last file in a directory

I need the Jboss CLI command to list the last file of a directory. For eg, I have the directory contains two files
helloworld.sh
helloworld1.sh
I Want a command to list only the last file.
JBoss CLI doesn't support listing files itself AFAIK.
Nevertheless, it seems you use the Jython, so you could use its own way to do what you need. Something like:
import os
os.listdir("/path/to/folder")[-1]

Refactor java classes on windows file system using cygwin

I'm trying to refactor classes from my local working copy due to an urgent refactor needed after a bug fix.
So what i am doing is, using cygwin, move to the dir where my exlipse workspace is located and run this query
find . -name "*.java" -exec sed -i 's/bug/big fix/' {} \;
I simply need to replace 1 line of code,
The issue is, that this affects also classes that does not contain tat bug, i see that by looking at the java files in svn, right after running my command on the java files icons in eclipse it appears the brows asterisk appears, and if i run a diff, i see that all lines differs, even though i thought not even one line should be modified.
My local working copy is on a windows file system, any advise?
#Aurand is probably right, it sounds like a line-ending issue. Reset the repo, then add the -b option to sed to preserve line endings.

Using external files and modules in perl PAR Packer

I'm having some trouble using the pp command to create standalone executables on a Linux machine. It seems that every tutorial says a different thing and I'm a bit confused. I'd like your help regarding two issues:
1. I'm trying to include a module created by me (.pm file), but not sure how to do so and keep getting error messages. Should I use the -M option? or should it be -B? And once the module is included, how do I call it from the script? the usual way (i.e. "use module" and then "module::sub")?
2. I want to include some text files too. So far, I've tried -a and -l options, but not sure if they actually work. Which one should I use? Also, how do I open these files? For instance, if I pack the file tmp.txt, what should the open command look like?
Thank you very much!
Adding modules with the -M option and use the module as usual.
Adding your text file with the -a option, from pp's manual:
By default, files are placed under / inside the package with their original names.
so you should be able to read these text files with:
my $content = PAR::read_file('your_file.txt');

how to parse files using ebrowse

I have a folder tree which contains my C++ files. After reading this document,
http://www.gnu.org/software/emacs/manual/html_node/ebrowse/Generating-browser-files.html#Generating-browser-files
still don't know how to parse all my c++ files in folder tree easily.
I can execute the command below in each folder manually, but looks stupid. I can write some scripts to do it recursively, but want to know any better idea here.
ebrowse *.h
I use ebrowse at work. I don't have my bash alias at hand, but from memory it looks like that:
ebrowse $(find . -name "*.[hc]pp")
Don't hesitate to replace the . with the path to the root of your project.
How about open it in dired buffer, then M-xfind-name-diredRETRET*.ht!ebrowse * ?
In other words: use dired to locate all files you need, then run shell command on them, shell command being ebrowse?
How'bout ebrowse **/*.h **/*.cpp? Don't know which shells support ** nowadays, but at least Zsh has supported it for a decade or two.

How to find unique lines in a text file from command line?

I would like to know how to extract a list of unique lines from a text file.
Preferably through Cygwin.
sort -u file > new_file
Your question is somewhat unclear. If you want to eliminate all duplicate lines from a text file you can do something like this:
cat file.txt | sort | uniq
Since the original question referenced Cygwin, which is Windows specific, I'll mention that Luis' answer works just as well using the GNU utilities for Win32 sort. I use the GNU ports off a USB key when I'm working on a machine that I don't want to install Cygwin on, or downloading and installing Cygwin seems like too heavy a solution for the problem I'm trying to solve.