comparing two files using shell script

hi experts

please help me to compare two files which are in different directory

file1<file will be master file>
(/home/rev/mas.txt}
ex x1
x2

file2 <will be in different folder>
(/home/rev/per/.....)
ex x3
x4
the filesinside per folder i need to compare with master file and the files inside the per are having some changes 3 and 4 but file name is same
so if i comapare i need to have the OUTPUT no difff for this ex

please help me i am new to this shell script and i have no idea

i need to compare this two files using shell scipt

The rules clearly state no posting homework assignment... why can't you use "diff"? It's made for this thing.

thank u