The tag has no usage guidance.

learn more… | top users | synonyms

4
votes
2answers
94 views

Adding column based on matching of second column

I have two files. The first file has the following format: 10D0325 2465 0 0 -9 -9 10D0598 2567 0 0 -9 -9 10D0562 2673 0 0 -9 -9 10D0175 2457 0 0 -9 -9 10D0241 2209 0 0 -9 -9 10D0954 2312 0 0 -9 -9 ...
1
vote
3answers
31 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] ...
1
vote
1answer
117 views

Merge multiple HTML files in reverse order?

I have multiple HTML files for this book. I am trying to add them in opposite order. I've tried: cat *.html >> merge.html I've tried to use tac on the list of downloaded files by time to no ...
-2
votes
1answer
138 views

How to create a script that merges two files to get a specific output in the korn shell? [duplicate]

I'm currently working on trying to merge two files together on unix and I REALLY need help. I'm very new to Unix (and this site) and would appreciate any assistance. first file: Tom 313.455.6786 ...
1
vote
0answers
32 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 ...
1
vote
2answers
92 views

merging text files into one

I have four text files each containing a single field. I want to convert them into a single text file with four fields (one from each file). How can I do this using shell scripting.
3
votes
1answer
91 views

Combine parts of pages of a PDF document

I have a PDF which has some content split onto 2 pages. The first part takes less or equal the bottom half of the first page and the second part takes less than the top half of the second page. For ...
0
votes
1answer
138 views

Why is .gitattributes applied only to files added to repo after defining it?

In my repos I'm implementing a new interesting strategy to preserve some versioned files from merges, that makes use of custom merge drivers and .gitattributes. Please take a look: ...
0
votes
1answer
1k views

How to exit a git merge asking for commit message?

I'm new to git. I did a normal merge, but it keeps asking this: # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic ...
1
vote
1answer
33 views

How do I merge (without copying) two directories? [duplicate]

I have: $ find 1 2 -printf '%i %p\n' 40011805 1 40011450 1/t 40011923 1/a 40014006 1/a/e 40011217 1/a/q 40011806 2 40011458 2/y 40011924 2/a 40013989 2/a/e 40013945 2/a/w I want: <inode> ...
2
votes
1answer
69 views

Is it possible and how to merge identical files between different snapshots in a btrfs file system?

I regularly use btrfs's snapshot to backup the whole system, but it's redundant to have identical files between different snapshots. Commonly, for example, I took a snapshot of @ as ...
0
votes
3answers
6k views

How to merge partition with gparted?

How I can merge all of my three unallocated spaces? And i want the bigger one to be under /dev/sda5. Gparted screenshot:
2
votes
3answers
806 views

Merging multiple tab-delimited tables based on common columns

I am new to the field and I want to compare and merge 500 hundred tab-delimited files, each with two columns ("Position" and "Poly"). Examples of file1, and file2 (and other files) and the final ...
3
votes
2answers
2k views

Merging multiple lines based on column 1

I have a file like below.. abc, 12345 def, text and nos ghi, something else jkl, words and numbers abc, 56345 def, text and nos ghi, something else jkl, words and numbers abc, 15475 def, ...
0
votes
1answer
354 views

merge unsorted file to sorted file using shell command

I want to merge/join or produce a new merged file . Both files contain common IDs in the first column . File 1 looks like this ID Tb927.4.4670 Tb927.8.3630 Tb09.160.4310 Tb927.8.3650 File 2 ...
4
votes
4answers
3k views

Merge 2 files based on all values of the first column of the first file

I need to merge below 2 files: file1: TABLES REF-IO HEAD-IO DIFF-IO test 200 500 -300 exam 2 3 -1 final 2 1 1 mail 4 2 2 TOTAL 208 506 -298 ...
1
vote
2answers
93 views

Merge 2 files based on all available values of the first column in both files

I need to merge below 2 files: file1: viewer 23 test 27 remark 2 file2: viewer 2990 exam 200 remark 240 merged file should be as shown below: type value1 value2 difference ...
1
vote
0answers
60 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 ...
5
votes
3answers
352 views

Join: Two files - but only append last two columns

Given the files: 1.txt 1, abc, 123, 456, 789 2, lmn, 123, 456, 789 3, pqr, 123, 456, 789 2.txt 1, abc, 123, 000, 000 3, lmn, 123, 000, 000 9, opq, 123, 000, 000 OUTPUT.txt ID, NAME, X, ...
1
vote
2answers
134 views

How can I merge multiple lines with spaces (blank line) separating them? [closed]

I'd like to merge the following multiple lines of output so that they form a single line: line 1: ...
1
vote
3answers
712 views

Is there a way to merge two files smartly? [duplicate]

I have two files with some lines being the same. File A : command 1{ some code lines } command 2 command 3 command 4{ some code lines } File B : command 5 command 3 command 1{ some ...
9
votes
2answers
5k views

Merge folders and replace files using CLI

I want to update some forum software and I'd like to test the upgrade process using CLI as a learning possibility. How do I merge contents of a folder into another folder and replace files?
1
vote
5answers
165 views

how to merge different files that have the same header but slightly different file name?

I have a problem in merging files for a big data sets like below. I want you help me to let me know the script that can do such task. fine name: fluxes_year_lat_long I have 30 years of daily fluxes ...
2
votes
1answer
91 views

How can I make multiple copies of one folder without merging?

When two or more identically named folders are to be copied into or moved to the same location, the default option either in the GUI file manager, or using in a terminal cp -r --backup=numbered or ...
2
votes
2answers
256 views

What scripting language can I use to automate a concatenation & zipping process?

For a project I'm doing I need to concatenate and compress (with zip) many (midi) files and compare their sizes. I've thought there must be some language that allows me to do something like this: ...
1
vote
2answers
165 views

Merge a number of text files into one with next line for every file

I have 2 files. I want to merge them. File1 contents: abc File2 contents: def Combined File should be: abc def
8
votes
4answers
1k views

how to merge pdf files so that each file begins on an odd page number?

I need to merge a few dozed pdfs, and i want all of the input pdfs to start on an odd page in the output pdf. Example: A.pdf has 3 pages, B.pdf has 4 pages. I don't want my output to have 7 pages. ...
5
votes
6answers
6k views

how to use patch and diff to merge two files

I have read about diff and patch but I can't figure out how to apply what I need. I guess its pretty simple, so to show my problem take these two files: a.xml <resources> <color ...
1
vote
1answer
1k views

Merging flv files causes a massive size increase

I have 3 flv files which I wish to merge. I used the answer in this post: Merge multiple flv files? which suggested this option: mencoder -forceidx -ovc copy -oac pcm -o output.flv input1.flv ...
2
votes
1answer
251 views

Using awk, how to get desired output from multiple file sources

I have two files: file1: A,D B,E C,F file2: G,H,I J,K,L Using awk, I want to print: A,D B,E,I C,F,L How can I use awk to achieve this?
3
votes
3answers
1k views

Merging content of two files with comparing content of column

I have a problem trying to merge content of two files : file 1 : 873 1.1.1.1 1033 99.99.99.10 1108 78.2.204.174 1257 78.2.8.181 file 2: test1 78.2.8.181 p6 test2 99.99.99.10 p9 test7 1.1.1.1 ...
2
votes
1answer
185 views

Is there a way to define the preferred merge or diff tool under Unix?

I know that you can define the preferred editor by setting the EDITOR environment variable. My question is if there is a similar solution for setting the preferred merge or diff tool.
9
votes
3answers
5k views

How do I “merge” two text files?

I recently upgraded from Ubuntu 12.04 to 12.10 and at one point, it encountered an Apache config file conflict in apache2.conf. I didn't give me a merge option at that point, so I just rejected the ...
3
votes
2answers
1k views

merging two column

input_file (columns are tab delimited, only column 4 contains spaces) input A B C D;<>X;<>Y 0 C D E F;<>Z;<>X 1 output A B C D;<>X;<>Y;<>apple=0 C D ...
4
votes
3answers
232 views

Merge files using zipper method / late merge

I am searching for a nice method of merging two or more files line by line using the zipper method (also called late merge). Assuming we have three files, the result should look like this: line1 ...
2
votes
3answers
2k views

How to merge output of two running log files in real-time

I have been analysing how a Linux USB driver works using two disparate methods: examining the output of usbmon, which is a hex dump-ish view of what's being sent "on the wire". adding printk() ...
9
votes
7answers
981 views

How to merge text of alphabetic lines with the numeric lines in shell?

I Have a file that has text like this: AAAA BBBB CCCC DDDD 1234 5678 9012 3456 EEEE 7890 etc... And i want to match up the Alphabetic lines with the Numeric lines so they are like this: ...
1
vote
1answer
439 views

merge txt files with similar name

I have thousands of .txt files in directory. Their names are: ch14.ta_20452_206652_15-84.txt ch14.ta_20452_206652_786-14.txt ch14.ta_20452_206652_77-85.txt ch14.ta_20452_206652_81-78.txt ...
1
vote
3answers
2k views

Join, filling in missing key values

I have two files having a primary key value as a first field, and a corresponding value(s) as the remaining fields, and some primary key values are missing in one of them but are present in another, ...
9
votes
2answers
5k views

Merging two internet connections from two network interfaces in order to obtain double speed

I have two network interfaces (one wired & one wireless). I have two internet accounts too (each 256 kBps; one from a modem that I use as wired connection & the other from a wireless network). ...
1
vote
1answer
1k views

Shell script to merge properties file (sed/awk/comm/diff) for rpm upgrade

We're developing a java product that's installed via rpm. We have a set of config files that a user can edit. These config files are java properties files in the form: com.acme.pkg1.setting=something ...
1
vote
1answer
73 views

Program to upgrade configuration files

When upgrading Ubuntu (and probably other *nixes), the upgrade process will show a diff of changed configuration files and ask whether I'd like to replace them, keep the old version, or manually merge ...