delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/18/21:08:19

To: djgpp AT delorie DOT com
Subject: Re: Diff compares specific files? (Not entire directory)
References: <ucXkMJVZ9GA DOT 204 AT uppubnews03>
From: M DOT A DOT Bukin AT inp DOT nsk DOT su
Date: 19 Apr 1998 07:57:49 +0700
In-Reply-To: "DeHackEd"'s message of "Sat, 11 Apr 1998 09:53:51 -0400"
Message-ID: <20af9i1vci.fsf@Sky.inp.nsk.su>
Lines: 21

"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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019