On 8/6/22 09:20, Fourhundred Thecat wrote:> how difficult would it be to patch 
find, to print trailing slash for
> directories?
>
> This seems like a very useful feature, without interfering with
> compatibility or specifications.
>
[...]
> I am wondering if some simple patch would be possible to do this by
> default in find?

Besides Andreas' excellent solution to achieve this with existing functionality,
I'd like to emphasize that we can't simply change the default behavior:
a) find(1) is a tool with looong history and many scripts rely on its behavior,
b) compatibility with other implementations, and
c) the POSIX specification [1] has a quite clear and strict definition about how
the output shall look like.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

Have a nice day,
Berny


Reply via email to