bug-findutils
[Top][All Lists]
Advanced

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

Re: Interpretation of locate -r in various locate implementations


From: Bob Proulx
Subject: Re: Interpretation of locate -r in various locate implementations
Date: Sat, 5 Apr 2008 10:51:28 -0600
User-agent: Mutt/1.5.13 (2006-08-11)

James Youngman wrote:
> I understand that "locate -r" works differently between GNU locate on
> the one hand, and both mlocate and slocate on the other.     GNU
> locate uses Emacs-dialect regular expressions.   Both mlocate and
> slocate use POSIX BREs.

That does seem to be a gratuitous difference.

> Anyway, on the one hand this divergence of interpretation of regular
> expressions is unlikely to be convenient for users, but on the other I
> believe it should be possible for tools to correctly handle white
> space, even newlines, in file names.    As the community of users of
> GNU locate, what are your preferences?

I think in the case of regular expressions that the "standard is
better than better" rule should apply.  I vote for using POSIX
standard BREs for GNU locate.  Then all of the knowledge and
documentation regarding standard BREs are applicable.

As far as handling newlines I think it would make sense to have '.'
match embedded newline characters.

Bob




reply via email to

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