Re: Openldap Experts

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

 



Robert L Cochran wrote:
Cameron Simpson wrote:
On 09Dec2007 15:17, Stuart Sears <stuart@xxxxxxxxxxx> wrote:
| 1. which (uncommented) lines are in /etc/ldap.conf at the moment?
| egrep -v '^($|#)' /etc/ldap.conf

OT - grep curiosity...
You can embed a "$" inside an alternation?

Personally, I've always used:

grep '^[^#]'

for this task.

Cheers,
This:

egrep -v '^($|#)' /etc/ldap.conf

matches any line which is not blank and does not have an octothorpe in it. It is not negating a character class which is what you put inside brackets [ ]. It is negating the start of a line or the octothorpe '#'. That leading caret ^ negates each alternative within the parentheses.

Bob Cochran

No, I'm wrong -- I put my foot in my mouth here. I should have checked on the -v option for egrep first. It inverts the sense of the match. And the '$' anchors the end of a line, not the start. I need to give this one more thought....

Bob

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux