www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/15/03:50:15

Date: Wed, 15 Apr 1998 10:47:39 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: djgpp AT delorie DOT com
Subject: Re: Diff compares specific files? (Not entire directory)
In-Reply-To: <ucXkMJVZ9GA.204@uppubnews03>
Message-ID: <Pine.SUN.3.91.980415104711.7293D-100000@is>
MIME-Version: 1.0

On Sat, 11 Apr 1998, DeHackEd wrote:

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

I assume you want to diff these files with older versions of those
same files in another directory.  Otherwise, wildcards don't make any
sense in the context of `diff'.

If the above is indeed the case, use the `-x PATTERN' option of
`diff', like this:

	diff -x '*.o' -x '*.bat' -r old new

where `old' and `new' are the two directories you want to compare.
The above example causes `diff' to ignore .o and .bat files.

If your problem was with the quotes, please note that the way to pass
special characters verbatim to programs is explained in sections 16.2
and 16.3 of the DJGPP FAQ list.

- Raw text -


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