01-14-2009
Help with merging files
i would like to merge two files that have the same format but have different data.
i would like to create one output file that contains information from both the original files.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Thanks in advance
I have 2 files having key field in each.I would like to join both on common key.I have used join but not sucessful.
The files are attached here .
what i Want in the output is on the key field SLS OFFR .
I have used join commd but not successful.
File one
=======
SNO ... (6 Replies)
Discussion started by: vakharia Mahesh
6 Replies
2. Shell Programming and Scripting
Hi,
I have got two files
1.txt
1111|apple|
2222|orange|
2.txt
1111|1234|000000000004356|
1111|1234|000000001111|
1111|1234|002000011112|
2222|5678|000000002222|
2222|9102|000000002222|
I need to merge these two so that my out put looks like below:
Search code being used should be... (4 Replies)
Discussion started by: jisha
4 Replies
3. Shell Programming and Scripting
Hi everyone,
I have two files which will be exactly same at first. After sometime there will be inserts in one file. My problem is how to reflect these changes in second file also.
I found out that any compare and merge utility would do the job like, GNU " sdiff " command. But the... (14 Replies)
Discussion started by: rameshonline
14 Replies
4. Shell Programming and Scripting
Hi,
I want to merge the two files on the basis of columns like...
file 1
Data Key
A 12
B 13
file2
Data Value
A A1
A A2
B B1
B B2 (5 Replies)
Discussion started by: clx
5 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have two files a.txt and b.txt.
a.txt
1
2
3
4
b.txt
a
b
c
d
e
I want to generate a file c.txt by merging these two file and the resultant file would contain
c.txt
1 (4 Replies)
Discussion started by: siba.s.nayak
4 Replies
6. Shell Programming and Scripting
I have two files
file 1 containing x rows and 1 column
file 2 containing x rows and 1 column
I want to merge both the files and add a comma between the two
eg
plz guide (1 Reply)
Discussion started by: test_user
1 Replies
7. Shell Programming and Scripting
Hello all,
I have limited experience in shell scripting. Here goes my question:
I have two directories that have same number of files with same file names i.e. consider 2 directories A and B. Both directories have files 1.txt, 2.txt......
I need to merge the file 1.txt of A with file 1.txt... (5 Replies)
Discussion started by: jaysean
5 Replies
8. Shell Programming and Scripting
:::::::::
::FileA::
:::::::::
A1-------A2--------A3---A4---A5--
=================================
AC5VXVLT-XX----------------------
B57E434--XXXX1-----MMMM-ZZZ--111-
C325G20--XXXXX3----CCCC------3332
DC35S51--XXXXY1----DDDD------44X-
DC35S52--XXXXY2----DDDD------44Y-... (5 Replies)
Discussion started by: lordsmiter
5 Replies
9. Shell Programming and Scripting
Guys,
I am having little problem with getting a daily report!
The daily process that I do is as follows
1. Unload Header for the report from the systables to one unl file, say Header.unl
2. Unload the data from the required table/tables to another unl file, say Data.unl
3. Send a... (2 Replies)
Discussion started by: PikK45
2 Replies
10. Shell Programming and Scripting
Hi All ,
I have a scenario where we need to combine two files .
Below are the sample files and expected output ,
File 1:
1|ab
1|ac
1|ae
2|ad
2|ac
File 2:
1|xy
1|fc
2|gh
2|ku
Output file :
1|ab|xy (3 Replies)
Discussion started by: saj
3 Replies
LEARN ABOUT MOJAVE
git-merge-index
GIT-MERGE-INDEX(1) Git Manual GIT-MERGE-INDEX(1)
NAME
git-merge-index - Run a merge for files needing merging
SYNOPSIS
git merge-index [-o] [-q] <merge-program> (-a | [--] <file>*)
DESCRIPTION
This looks up the <file>(s) in the index and, if there are any merge entries, passes the SHA-1 hash for those files as arguments 1, 2, 3
(empty argument if no file), and <file> as argument 4. File modes for the three files are passed as arguments 5, 6 and 7.
OPTIONS
--
Do not interpret any more arguments as options.
-a
Run merge against all files in the index that need merging.
-o
Instead of stopping at the first failed merge, do all of them in one shot - continue with merging even when previous merges returned
errors, and only return the error code after all the merges.
-q
Do not complain about a failed merge program (a merge program failure usually indicates conflicts during the merge). This is for
porcelains which might want to emit custom messages.
If git merge-index is called with multiple <file>s (or -a) then it processes them in turn only stopping if merge returns a non-zero exit
code.
Typically this is run with a script calling Git's imitation of the merge command from the RCS package.
A sample script called git merge-one-file is included in the distribution.
ALERT ALERT ALERT! The Git "merge object order" is different from the RCS merge program merge object order. In the above ordering, the
original is first. But the argument order to the 3-way merge program merge is to have the original in the middle. Don't ask me why.
Examples:
torvalds@ppc970:~/merge-test> git merge-index cat MM
This is MM from the original tree. # original
This is modified MM in the branch A. # merge1
This is modified MM in the branch B. # merge2
This is modified MM in the branch B. # current contents
or
torvalds@ppc970:~/merge-test> git merge-index cat AA MM
cat: : No such file or directory
This is added AA in the branch A.
This is added AA in the branch B.
This is added AA in the branch B.
fatal: merge program failed
where the latter example shows how git merge-index will stop trying to merge once anything has returned an error (i.e., cat returned an
error for the AA file, because it didn't exist in the original, and thus git merge-index didn't even try to merge the MM thing).
GIT
Part of the git(1) suite
Git 2.17.1 10/05/2018 GIT-MERGE-INDEX(1)