bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU diff and missing last newline


From: Edward Arthur
Subject: Re: GNU diff and missing last newline
Date: Tue, 17 Jul 2001 09:25:53 -0400

What's a good test for missing trailing new line?

Sorry, its early and I'm sleep deprived.
/Ed

Paul Eggert wrote:
> 
> > From: Edward Arthur <address@hidden>
> > Date: Fri, 06 Jul 2001 11:26:24 -0400
> >
> > I have hacked tkdiff to ignore stderr but I'd rather add on option
> > to diff to not print an error when a trailing newline (on the last
> > line) is missing.
> 
> That's rather a specialized option.  It might be nice to have.  But in
> the meantime you could perhaps modify the invoker of 'diff' to detect
> this situation, and if it happens, invoke
> "(cat file-without-trailing-newline && echo '') | diff file -".
> That should work on all versions of "diff".
> 
> > Is there any development going on with diff?
> 
> Yes; I expect a new test version fairly soon.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]