Is there a way to limit DIFF output

Hello is there a way to limit the number of lines output by the DIFF command?

I tried -C 200 ect and -c but it continues to print out the whole huge file.

Reason needed is i'm trying to do alot of DIFFs on a long list of files and would like to only get back an indicator which files are different, ie using $? following the DIFF or something like that

Thanks!
BobK

Use the -q option of diff.

$ diff infile infile2
5c5
< abc|def|123|456|
---
> ____abc|def|123|456|
$ echo $?
1
$ diff -q infile infile2
Files infile and infile2 differ
$ echo $?
1
$

you can also use the cmp command :

$ cmp infile infile2
infile infile2 differ: char 32, line 5
$ echo $?
1
$ cmp -s infile infile2
$ echo $?
1
$

Jean-Pierre.

great thanks alot works great! have a nice weekend!