sort and diff 2 files

i have to compare 2 flat files in unix containg 27 columns separated by pipe. the filename shall have dates assigned and i need to first sort the files in say ascending order and then compare it with yesterdays file and write output to a 3 file . this is to be done to find out what has changed between todays and yesterdays file.what is the best way to do this?the first column is date .
sample file with 2 rows.
2008-01-01|10|7126|3887|5297|*|187|2401|4421|11|15|1|6|45|5237880.77|xxxxx|hgfdfgbfg|9999-12-1|2008-02-02|fgf275|||2008-02-02|2008-02-02 07:50:57|||
2008-01-01|10|7126|3887|5297|*|187|2394|4411|11|15|1|6|46|250000.00|xxxxx|dfgfdgfd|9999-12-31|2008-02-02|hjh275|||2008-02-02|2008-02-02 07:50:57|||
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

do you mean ascending by date?
sort file1 > file1.sort
sort file2 > file2.sort
comm -3 file1.sort file2.sort

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rajeshnayakwadiAuthor Commented:
i think if file needs to be sorted by all 27 columns .
So do the above commands do what you want?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.