On Fri, Jul 04, 2008 at 10:34:32PM -0400, Mikhail Goriachev wrote: > Quoting Peter Pentchev <[EMAIL PROTECTED]>: > > > On Fri, Jul 04, 2008 at 01:22:15PM -0400, Mikhail Goriachev wrote: > >> Hi, > > [snip] > >> I slapped together a workaround. Here's a "patch", maybe the idea of > >> it will be of some use. > > > > Just a minor comment on the patch: > > > >> +DBDIR=`grep directory /usr/local/etc/openldap/slapd.conf | awk '{ > >> print $2 }'` > > > > This is better written as > > > > awk '/directory/ {print $2}' /usr/local/etc/openldap/slapd.conf > > Nice one! > > > or possibly (I'm not quite familiar with the slapd.conf syntax) even: > > > > awk '$1 == "directory" {print $2}' /usr/local/etc/openldap/slapd.conf > > They both work but I like the first one more.
Actually the second one might be better - the first one may be confused by the string "directory" appearing either in a comment or in the string value of some other parameter or even in the *name* of some other parameter. G'luck, Peter -- Peter Pentchev [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 This sentence was in the past tense.
pgpO1jGnVO9tD.pgp
Description: PGP signature