Mail Archives: djgpp/1998/04/18/21:08:19
"DeHackEd" <Not DOT given AT out> writes:
> I am having some minor troubles with diff. I have a directory filled with .C and
> .H files, as well as some things such as .O, C files that arn't part of the new
> program, and a few .bat files. I don't want all these unnecessary files to be in
> my diff file, but I can't seem to get diff to read specific files. It won't
> accept wildcards becuase of globbing, and if I put the string in " so it won't
> glob, it complains the file *.c does not exist.
>
> Is there a way to make it read specific files - a response file perhaps?
You can exclude files by pattern or by any pattern from file.
From `diff --help`:
...
-x PAT --exclude=PAT Exclude files that match PAT.
-X FILE --exclude-from=FILE Exclude files that match any pattern in FILE.
...
and quote pattern with "". Read also `info.exe diff "invoking diff"'.
But, IMHO, better is to remove all unwanted files before comparing.
- Raw text -