Comparing two files

Hi,

any suggestions to make an script doing the next steps?

1.- compare two files.

2.- generate and exit file per every difference found.

3.- every exit file must be named with the difference found and its content must be "1".

We are beginners in shell scripting and any help would be appreciated.

Thanks!

man diff
man comm
man uniq
man sort

uniq may help to remove unexpected duplicate lines (you may want to sort your file at first... just as when using the comm command)

refer Essential Linux Commands in Linux 101 Hacks eBook � Table of Contents