[Pkg-openldap-devel] Re: r542 - openldap/trunk-2.2/debian
Steve Langasek
vorlon@debian.org
Sun, 24 Apr 2005 01:00:51 -0700
--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi Torsten,
On Sun, Apr 24, 2005 at 08:56:57AM +0200, Torsten Landschoff wrote:
> On Sun, Apr 24, 2005 at 04:25:10AM +0000, Steve Langasek wrote:
> > Log:
> > re-fix the grep expression, so that it actually works, thanks for check=
ing Stephen :)
> ...
> > - if [ -z "$RET" ] || ! echo "$RET" | grep -q '^[a-zA-Z0-9\-\.]*$'; th=
en
> > + if [ -z "$RET" ] || ! echo "$RET" | grep -q '^[a-zA-Z0-9.-]*$'; then
> > db_fset slapd/domain seen false
> > invalid=3Dtrue
> > fi
> I wonder if this is the correct fix. Somebody told me that grep would
> bark because it now expects the second part of the range. I am not sure
> how it is done right but maybe [-a-zA-Z0-9.] makes more sense? What do
> you think?
According to the grep manpage, which Stephen quoted at me:
To include a literal ] place it first in the list. Similarly, to include
a literal ^ place it anywhere but first. Finally, to include a literal
- place it last.
So that is a pretty clear recommendation, and it also works from what I saw
when testing.
It's uploaded now anyway with Stephen's blessing, so you can blame him for
any new bugs. ;)
--=20
Steve Langasek
postmodern programmer
--pWyiEgJYm5f9v55/
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCa1IyKN6ufymYLloRAnBrAJ9C63V3uOmtCp8zO9ubMfav18BF3gCfR7jq
5F+B9eIPTlua7D+ifgyEr7Q=
=cxzt
-----END PGP SIGNATURE-----
--pWyiEgJYm5f9v55/--