RabbieBurns Posted June 25, 2008 Posted June 25, 2008 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 ?
OutToLunch Posted June 25, 2008 Posted June 25, 2008 Give WinMerge a go - WinMerge http://winmerge.org/2.8/manual/IntroDiff.html#d0e892 1
Jona Posted June 25, 2008 Posted June 25, 2008 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. Cheers Jona
Scotmk Posted June 25, 2008 Posted June 25, 2008 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.
Scotmk Posted June 25, 2008 Posted June 25, 2008 ok, I read post again, this wont work for replacing change characters, but still, handy.
mattx Posted June 25, 2008 Posted June 25, 2008 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. Also there is a compare in DOS too. [ Comp ] Like Scotmk, have not had to use that for a long time.....Arrrrr the memories
RabbieBurns Posted June 25, 2008 Author Posted June 25, 2008 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 1. Section1: 2. 3. Name=Blah 4. Colour=blue 5. Size=10 6. Font=Times 7. Exist=Yes 8. Blah=1 9. Blab=2 but the new file looks like this 1. Section1: 2. 3. Name=Crah 4. Colour=green 5. Size=15 [b]6. Newsetting=1[/b] 7. Font=Comic 8. Exist=No 9. Blah=2 10. Blab=4 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.
RabbieBurns Posted June 29, 2008 Author Posted June 29, 2008 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now