Questions tagged [merge]

Merging is the operation of taking two or more source contents to produce a single one. Things that are commonly merged are files (source code, configuration, etc.), branches in a version control system, redundant entries in databases, etc.

25 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
1k views

Merge pdf files and automatically create a table of contents with each file as an entry

I have several pdf files (chapter1.pdf, chapter2.pdf, etc.), each one being a chapter of a book. I now how to merge them into a single pdf (I use the command pdfunite from poppler), but since the ...
4
votes
4answers
183 views

Compare lines and upgrade two different files

I have a couple of text files with the following features: $ cat file_1 Line A Line B Line C Line D $ cat file_2 Line A Line added 1 Line B Line D Line added 2 They are such that file_1 has some ...
3
votes
1answer
146 views

Merge 2 huge files matching multiple columns and preserving the order (print matching and non-matching values) - scale up from awk

I'm having trouble with merging data from 2 files. It is genetic data with chromosome, position, reference and alternate alleles and I need to merge the files by matching all 4 of those columns - with ...
2
votes
0answers
103 views

Vimdiff copy above/below

do and dp are kinda limited to take one or another version of the conflict, in many cases it's just java imports when you need both changes, is there any way to make a map that copies the other side'...
2
votes
0answers
136 views

Combine multiple PSCP commands?

I need to transfer multiple folders from my server to my pc. I'm currently using a command like: pscp -r user@ServerIP:/public_html/folderA "C:\folderA" && pscp -r user@ServerIP:/public_html/...
2
votes
1answer
73 views

Merge several files with maximum 1 line difference

Suppose I have the following files: file0.c: int b=NULL; int a=NULL; file1.c: int b; int a=NULL; file2.c: int b; int a=NULL; I am looking to merge the files file1 and file2 to generate the ...
2
votes
1answer
1k views

How to copy/merge two directories and if two files have the same name rename the older one appending its modification time

I have several directories with files which mostly have the same name but might be different and I need to have all these directories merged into a new one. I need to be able to compare the same named ...
1
vote
0answers
66 views

How do I merge identically named files?

My question is similar to this one but the answers don't address how I would like to solve it in my case: Background: I have two computers generating experimental results that are filed in ...
1
vote
0answers
36 views

merge commands for line-by-line interactive merging with sdiff, in MacOS unix. Is there a working version?

On MacOS, the sdiff command is described as able to do line-by-line interactive merging, and lists several merge commands for the latest chunk. e.g. sdiff -o mergefile fileleft fileright The single ...
1
vote
0answers
260 views

socat to merge TCP streams

I'm trying to merge 2 TCP streams into one and then send the result outside through a TCP port server. The first part is Ok, I'm able to capture incoming streams as below: STREAM1: socat TCP:127.0.0....
1
vote
0answers
506 views

Merge two videos using FFMPEG side by side without black portion on top and bottom

I have two video files of size 360X406 each, I want to merge them side by side to size 720X406. However the below command generating the video output of size 720X406 but its resolution look different ...
1
vote
0answers
51 views

Restoring Maildir emails from backup on different machine (so filename conventions differ)

I have GMail synced via IMAP using offlineimap on Machine A and Machine B. I accidentally deleted 5000 messages when trying to sync Machine B. Machine A was off at the time, and so I still have ...
1
vote
0answers
60 views

How to Do Quality Assurance of Merged Videos?

Code developed originally in the thread How to order and merge many .ts files? which works in statically generated parts of videos to some extend but has limitations in the dynamic view echo '...
1
vote
1answer
47 views

Scan though directory of files and find replicates with same name and concatenate them into one file

I have a directory with a bunch of files For example: ExperimentA_Rep1.bed ExperimentA_Rep2.bed ExperimentA_Rep3.bed ExperimentB_Rep1.bed ExperimentD_Rep1.bed ExperimentC_Rep1.bed ...
1
vote
3answers
611 views

Using awk to merge 2 files

I would like to merge 2 files based on column 1, 2, 3. I have tried the awk command below but is not working. awk 'NR==FNR {h[$1FS$2FS$3]=$4; next}{k=$1FS$2FS$3; if (k in h) print $1,$2,$3,$4,h[k] ;...
0
votes
1answer
42 views

merging files with the same 1 column

I have multiple files named p1.bbmap.mapping.csv, p2.bbmap.mapping.csv, p3.bbmap.mapping.csv ... p3.bbmap.mapping.csv Each file has two columns. p1_60_length_504_cov_1.580902 12 ...
0
votes
1answer
324 views

Mount and merge folder contents

Is there any way to mount a folder content inside to another one? Let's say I have 2 folders with following content; Folder1 Folder2 file1 file2 I basically want to make visible all ...
0
votes
1answer
846 views

How to merge two gz files into new outputfile with specific name

I have 96 *fastqc.gz raw read files from 24 samples. Each sample was sequenced on two lanees for each pair. I would like to merge reads for each pair from both lanes into one output file with same ...
0
votes
1answer
62 views

Merging columns from 200+ big files into one table

I have 200+ large files that all have exactly 1 column and 76M rows. I want to start a newfile.txt and slap the columns next to each other (match Line 1 of File 1 with Line 1 of File 2... and continue ...
0
votes
2answers
388 views

How to merge two /etc/group files

I have two files in style of /etc/group : root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4:username tty:x:5: disk:x:6: lp:x:7: mail:x:8: news:x:9: ubuntu:x:999: And I want to merge them into a third ...
0
votes
0answers
857 views

Merge/combine two monitors into one desktop

I'm running Arch Linux on a PC with a ATI HD 5870, using the open source driver. I have two HD-monitors and I want to "merge" these screens into one large desktop (3840x1080), so I can run a ...
0
votes
3answers
925 views

How to merge two csv files with common but differently ordered headers?

I have multiple files (>150) with multiple columns (>150). Most of the headers are common but occur in different order (as eg below): File 1: Col1 Col2 Col3 Col4 Col5 A B C D E File 2: ...
0
votes
2answers
123 views

copy lines of text between two files using string matches

Looking for some help, I have two files, one is a large list of various names the other is coordinates. both files start each line with an 8 digit code. I want to lookup 8 digit line code from File1 ...
0
votes
2answers
86 views

How to paste over column by separate matching column

I have these two files: file1.txt 0 rs3094315 0 0 C T 0 rs12562034 0 0 A G 0 rs3934834 0 0 C T file2.txt Chr,Pos,snp_name 1, 742429,rs3094315 Where the ...
0
votes
1answer
135 views

Join two tables based on non-sharing values in chosen column

I have been using "Perl for biologists with little computer coding knowledge" from site called Scriptome (Harvard). It gives great Perl one-liners to achieve desired functions which runs on Unix ...