"Help with comparison shell script"

Hi,

I have a script which uses SQL to take the contents of a DB table and saves the contents to two text files one contains the headers of the DB and the other contains the contents of the DB. These files are stored in directorys that are named dependent upon the current date i.e. 20110305.

Everytime my script runs it will either overwrite the current directory replacing the files or if it is run the next day it will produce another directory i.e. 20110306.

My question is how can I compare the files contained within 20110306 against any of the other previous files and export the diffrences to screen.

Thanks in advance Chris

Use diff command to compare your files.

If you post real examples/samples of the files and solution you are seeking, it will be easier to suggest a specific solution.