Script to compare two text files

i am working on a shell script and need help in the comparing part of it. for e.g. there two text files like this:

file1.txt

name1
name2
name3 

file1 has to be comared with file2

defaultfile.txt

name1
name2
name3
name4

and during comparision with defaultfile.txt

if file1.txt contains conents of defaultfile, it should echo file authenticated

if file1.txt contains content which is not in defaultfile.txt, and it should echo file not authenticated....

i tried diff command but it doesnt seeem to help me

What have you tried?
The commands

diff
comm

should be able to help you.

No double posting: Thread closed...
Continue here: