Subject: Re: CVS commit: src/usr.bin/find
To: None <firstname.lastname@example.org>
From: Valeriy E. Ushakov <email@example.com>
Date: 10/22/2005 17:30:35
On Fri, Oct 21, 2005 at 22:59:13 -0400, Christos Zoulas wrote:
> | Christos Zoulas wrote:
> | > But that is a special case, it is not path normalization which
> | > they don't do. They are not really trimming trailing slashes or
> | > anything. We can do the same too.
> | Should we?
> Maybe so that we are compatible with everyone else
Doesn't this open a can worms? What do we do with several trailing
slashes? E.g. my FreeBSD box does:
$ find /bin | sed 2q
$ find /bin/ | sed 2q
/bin/ # shall we drop this one too?
$ find /bin// | sed 2q
Things get more interesting if the path is a symlink to the directory.
$ find /home
$ find /home/ | sed 2q
/home/ # <- cannot drop this one
What if the output from find is intended to be used as part of some
$ find /usr/src/ -type d | while read d; do echo $d/CVS; done
Does the double slash in the first line bothers you too?
As Christoph pointed out earlier in the thread, it's not always a good
idea for a program to try to get "helpful".
I mean, find *works*. The names it prints are correct pathnames that
resolve to the files you expect. Does minor eye candy really worth
firstname.lastname@example.org | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen