How do you do....it? Thread, merging 2 text files in Technical; Im trying to do something and I cant think of the easiest way to do it.
I have a config ...
25th June 2008, 01:13 PM #1
merging 2 text files
Im trying to do something and I cant think of the easiest way to do it.
I have a config file for something, and it is about 20,000 lines long.
The new version of the software adds about 300 lines of new options at various parts in the file. The new config has the default settings in it.
Without going through the new one and changing each part manually, is there any way I can merge my existing config with the new one, while keeping the new added options intact?
I really dont want to have to edit ~ 10,000 lines again.
I had a look at ultracompare, and it finds the lines that are different, and the most of them match up, but it doesnt seem to replace lines from one to the other ?
IDG Tech News
25th June 2008, 01:29 PM #2
Thanks to OutToLunch from:
RabbieBurns (29th June 2008)
25th June 2008, 01:55 PM #3
I suggest cat - native in unix or Native Win32 ports of some GNU utilities
You should be able to do it with redirect in batch, but I'm not 100% sure of the syntax.
25th June 2008, 02:01 PM #4
have a look at meld
Meld : Home Page
25th June 2008, 02:24 PM #5
If its just lists (everything on its own line) you can use good ole fashion DOS.
copy 1.txt + 2.txt 3.txt
will append 1.txt to 2.txt in a file called 3.txt.
Just have to ensure theres a carraige return on end of each line I think, its been a while.
25th June 2008, 02:25 PM #6
ok, I read post again, this wont work for replacing change characters, but still, handy.
25th June 2008, 02:27 PM #7
Also there is a compare in DOS too. [ Comp ]
Originally Posted by Scotmk
Like Scotmk, have not had to use that for a long time.....Arrrrr the memories
25th June 2008, 03:01 PM #8
I dont want to append files on the end of other files, I want to take lines out of 1 file, and put them into the new file.
for example the old file looks like this
but the new file looks like this
So I want to get my old settings accross to the new config file, but allowing for the new additions which are in the new config file.
I had a quick look at Winmerge at lunch there, will have a look at Meld after work. Cheers.
29th June 2008, 05:45 PM #9
Managed to get it sorted with winmerge. Took many hours in the end but the end result is worth it (new skin for my eva8000)
Thanks for the heads up on winmerge OutToLunch
By andy in forum Virtual Learning Platforms
Last Post: 12th March 2008, 08:00 PM
By ryan_powell in forum Wireless Networks
Last Post: 6th February 2008, 09:46 AM
By bensewell in forum MIS Systems
Last Post: 12th October 2007, 03:23 PM
By d1551 in forum Wireless Networks
Last Post: 9th January 2007, 10:11 AM
By _Bob_ in forum Scripts
Last Post: 7th June 2006, 03:11 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)