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

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

Re: On darwin, diff <(echo ab) <(echo cd) does nothing


From: Vincent Lefevre
Subject: Re: On darwin, diff <(echo ab) <(echo cd) does nothing
Date: Tue, 23 Aug 2005 14:10:20 +0200
User-agent: Mutt/1.5.10-vl-20050813i

On 2005-08-21 20:01:48 -0700, Paul Eggert wrote:
> I think it depends on what one wants.  For example, suppose d is a
> directory and you do something like this:
> 
>    mkdir e
>    ln d/* e
>    touch e/newfile
>    diff -u d e
> 
> I would expect to see:
> 
>    Only in e: newfile
> 
> even if there is a fifo in d.  That is because I want to see the
> difference in the directory structure, and I don't want diff to read
> the fifo twice.

This is a completely different thing here. POSIX says:

  If both file1 and file2 are directories, diff will not compare block
  special files, character special files or FIFO special files to any
  files and will not compare regular files to directories.

Even if the fifo's don't have the same inode, they must not be
compared, since d and e are directories.

-- 
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA




reply via email to

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