Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Programming Languages (http://www.programmingforums.org/forum38.html)
-   -   can someone make a program for me? (http://www.programmingforums.org/showthread.php?t=7173)

zero771 Nov 24th, 2005 7:10 PM

can someone make a program for me?
 
i dont care what programming language, but i need a program that checks every line in one text file with every line in another text file starting from a certain line on both. so that would make the line for each text file a user input thing and the text file itself would be user input with help of the "browse..." button that i see all the time.
will someone plz program that for me?

jayme Nov 24th, 2005 7:14 PM

Correct me if im wrong, but shouldn't you be posting here?

Job Offers

BTW, ill see if i can do it.. it will be a console program though so you would input text to the console, if you dont mind of course.. but its free so you wont mind will you?

zero771 Nov 24th, 2005 7:18 PM

>.> i dont know lol so i guess i dont mind
thank you for your help

linuxpimp20 Nov 24th, 2005 7:21 PM

Quote:

Originally Posted by zero771
i dont care what programming language, but i need a program that checks every line in one text file with every line in another text file starting from a certain line on both. so that would make the line for each text file a user input thing and the text file itself would be user input with help of the "browse..." button that i see all the time.
will someone plz program that for me?

what is your operating system? If it is a *nix you could use diff - the only thing is im not sure if you can specify from a specific line to another specific line. And what do you want it to check for? To see if they are different? If you just want to know if the two files are different you could use cmp.

zero771 Nov 24th, 2005 7:24 PM

well you know if you download hosts files, and say you download it from different sources
you dont want the new hosts file to overwrite all the lines from the other files
so i want a program that takes the first host file (and i'd be saving both as txt files to save the programmer time) and takes say the first line scans it with the second text file, all lines to see if it is there, and then if it is not there it would add it to the second text file
and im on windows xp

zero771 Nov 24th, 2005 7:33 PM

can that be done?

jayme Nov 24th, 2005 7:38 PM

im thinking about how it could be done, but im only about 3 weeks into programming so i dont know if its do-able in my position and with the knowledge i have. What im thinking about doing is letting you input the specific text to look for in one file, then it will compare it to another file (you will be asked the 2 files to compare) but i first have to find out how its possible to search using C++.. might take a little while because im also trying to finish something right now.

zero771 Nov 24th, 2005 7:42 PM

well see if u have it so that its one specific line of text that u input into the program
then i have to compare ... more than 100 lines every time >.> a hosts file is also in alphabetic order so if i compared it manually it would prolly go faster...

edit:
sry if its too hard u can take ur time in making it since i myself cant do it

DaWei Nov 24th, 2005 8:17 PM

Why the hell don't you just sort and merge the two files, shucking duplicates as you go. And get the hell into the Job Offers forum where you belong. It isn't real hard to figure out what the title of that forum means.

andro Nov 24th, 2005 9:26 PM

:

sort file1 file2 | uniq > merged


All times are GMT -5. The time now is 8:47 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC