LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-29-2012, 10:53 PM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
command to merge old with new files


Hi,

I was wondering if anyone might be able to help me here. There is a program that I need to upgrade to the next version. However, instead of overwriting the old files with the new ones, it requires me to merge them. I have not done this myself before as I am still learning my way around ubuntu server 10.04 OS. I wonder what command I can use to merge two files together.

Any help would be greatly appreciated.

Thank you
 
Old 03-29-2012, 11:15 PM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135
cat command is there for concatenation.

check
Quote:
man cat
merge file1 and file2 and save in file3.

Quote:
cat file1 file2 > file3
 
Old 03-30-2012, 06:11 AM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958
I think it would be better to get some more details before we go offering "solutions" based on guesswork.

Specifically, "merge" is a word that can have many different interpretations. The cat command given above simply appends the second file after the first one. But if you mean something that intersperses lines, removes duplicates, or what, you're going to have to detail that.

So give us an actual example of what you need to do. Post the input texts and the desired output. And don't forget to use [code][/code] tags to protect the formatting.

A few other details, like what this mysterious "program" is, might help too. Instead of posting vague descriptions, try reading How To Ask Questions The Smart Way, and give us some specifics. Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Split and merge files from the command line LXer Syndicated Linux News 1 10-10-2012 02:43 AM
[SOLVED] Command to merge linewise from 2 files mandyapenguin Linux - Newbie 12 12-01-2011 08:16 PM
[SOLVED] awk command to merge two files silkysue Linux - Newbie 7 01-27-2011 10:14 AM
awk command to merge columns from two separate files into single file? johnpaulodonnell Linux - Newbie 4 01-23-2007 10:10 AM
Is there a command to merge two files as two columns of one file? davee Linux - General 2 07-19-2005 10:52 AM


All times are GMT -5. The time now is 09:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration