Computing.Net > Forums > Unix > compare two files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

compare two files

Reply to Message Icon

Name: sand_vand
Date: August 12, 2009 at 06:09:08 Pacific
OS: Unix
Subcategory: General
Comment:

I will have to compare two files File1 and file2 ignoring the timstamps the date field contains in both the files



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: August 12, 2009 at 21:12:43 Pacific
Reply:

You will not be able to do if easily. Either the lines containing the date and time stamps have to be ignored or the time stamps have to be changed to a known constant string.

Also, are the files binary or ascii?


0

Response Number 2
Name: sand_vand
Date: August 12, 2009 at 23:35:18 Pacific
Reply:

Its an ASCII file.
Problem is that I cannot ignore the date fields, but can ignore the timestamps


0

Response Number 3
Name: nails
Date: August 13, 2009 at 06:50:37 Pacific
Reply:

The diff command is what you'll want to use. I think a script that skips the unwanted date is needed. Instead of skipping the data fields they could be set to a constant just during the comparision.

Please be more specific about where the date fields are and what they look like.


0

Response Number 4
Name: tvc
Date: August 15, 2009 at 12:53:07 Pacific
Reply:

Bit of a confusing question ... do you mean some date INSIDE the file, or the date of the files ?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: compare two files

compare two files and diff file wil www.computing.net/answers/unix/compare-two-files-and-diff-file-wil/7363.html

compare two files field string www.computing.net/answers/unix/compare-two-files-field-string/8078.html

comparing two files www.computing.net/answers/unix/comparing-two-files/8256.html