Merge different versions of file in UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Merge different versions of file in UNIX
# 1  
Old 01-18-2013
Code Merge different versions of file in UNIX

Hello Experts,
I want to merge my local file (File1) with the changes in remote server (File1). For Example:

File1 contents are... (file @ remote server)
ABC
<blankLine>
GHI
<EOF>


I, as USER#1, have updated the contents of File1 in my local as...
ABC
DEFGhi
<blankLine>
JKL
<blankLine><EOF>

meanwhile, some USER#2, have already commited the new changes in remote server repository...now the File1 contents, @ remote server, are...
ABC
123DEF
GHI
<EOF>

Now, I don't want to simply replace remote File1 with my local File1 coz by doing so, I might overwrite on USER#2 changes. So now I need to merge the latest file in remote server repository with my local file changes (without changing the sequence). Can anyone please help?
# 2  
Old 01-18-2013
The correct way to do this is to use file revision control. See Revision control.
This User Gave Thanks to fpmurphy For This Post:
# 3  
Old 01-21-2013
Thank you fpmurphy for replying to the query!

We already have file revision control in place but just want to see whether the same can be done through UNIX.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Fedora

All different versions of UNIX

Hello, I am very new at this and would like to know how many versions of Unix there are and all of the different versions of unix. (3 Replies)
Discussion started by: rosanna azani
3 Replies

2. UNIX for Advanced & Expert Users

merge two tab delimited file with exact same number of rows in unix/linux

Hi I have two tab delimited file with different number of columns but same number of rows. I need to combine these two files in such a way that row 1 in file 2 comes adjacent to row 1 in file 1. For example: The content of file1: field1 field2 field3 a1 a2 a3 b1 b2 b3... (2 Replies)
Discussion started by: mary271
2 Replies

3. UNIX for Dummies Questions & Answers

Differences between different versions of Unix

I sent a private message to one of the administrators/moderators, but I thought I'd ask here publicly after some thought. I'm getting into Unix on my Mac (BSD). I was just wondering what the differences are between versions of Unix -- I want to learn more about it, but would it be better to... (1 Reply)
Discussion started by: Straitsfan
1 Replies

4. UNIX for Dummies Questions & Answers

Versions of UNIX

Hi all: I was just wondering if someone could tell me what versions of UNIX are available to public? I'm aware of all the available distro's for Linux e.g. Debain, SuSe, RedHat, etc ... However you never really here much about UNIX distro's! Is UNIX BDS a common one in use? Thanks Oliver (4 Replies)
Discussion started by: oliver79
4 Replies

5. UNIX for Dummies Questions & Answers

Using multiple java versions in unix

Hello we are using java 1.2 in our shell / env it is also set in the main JAVA_HOME env var , but we have also java 1.4 installed , now we need to use new application that uses only java1.4 is there any way to point this specific application to use java 1.4 without changing the global... (2 Replies)
Discussion started by: umen
2 Replies

6. Cybersecurity

Unix tracking software versions

I want to maintain a repository to track versions of common daemons running on several platforms such as apache, ssh, mysql; so that i can asociate vulnerabilities for each version of sw, Does anyone know if there is a project about this requirement? I search for projects in sourceforge, freshmeat... (2 Replies)
Discussion started by: Nektar
2 Replies

7. UNIX Desktop Questions & Answers

Need to know all versions of Unix

:confused: What are some of the most popular versions of Unix and why? (2 Replies)
Discussion started by: jpawlicki2
2 Replies

8. UNIX for Dummies Questions & Answers

Diffrent versions of Unix/Linux

With so many diffrent flavors out there, how is a person soposed to know what to go with? I'm not asking for specific discussion here in this forum, but I would like to see various pages and articles dicsussing the pluses and minuses of various unix/linux OS's. I have been searching various... (1 Reply)
Discussion started by: MorderKartoffel
1 Replies

9. UNIX for Dummies Questions & Answers

why are some unix versions licensed ?

Like Unix Sco for example , i know that unix is available for free, maybe some utilities cost money...What is special about Unix Sco??? (2 Replies)
Discussion started by: BAM
2 Replies

10. UNIX for Dummies Questions & Answers

What different versions of UNIX are there?

Aside from the normal Linux distros, OS X, and the BSDs, what other forms of UNIX are there? I want to try one on a very old 75mhz box I have. Thanks in advance. (3 Replies)
Discussion started by: AMDPwred
3 Replies
Login or Register to Ask a Question