Depends how big the differences are
If you expect big more or less big differences you could start by finding files, that actually differ from your main file.
In this little example I take file1 and compare it against file2 through file8:
Code:
#!/bin/sh
for a in $(ls | grep -E 'file[2-8]') ; do diff -q file1 $a | cut -d " " -f 4 >> differ ; done
% cat differ
file2
file3
file5
file8
Adapt it to your case, rename your main file to something unique and grep all other 499 files by a regular expression or put them all into one directory.
Then you got all filenames that differ from your main file in the file differ for further processing with a more precise approach.
gdiff(1) (part of port/package textproc/diffutils) might be what you are looking for, ex. with colored output: gdiff --color=auto 500FilesDir/* --to-file=base_config_file.
After reading k.jackers shell script more carefully I realised that I missunderstood the task in my previous posting. gdiff 500FilesDir/* --to-file=base_config_file -q will list only the files which differ.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.