[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Matching partial things with a reversal
From: |
Christopher Browne |
Subject: |
Matching partial things with a reversal |
Date: |
24 Mar 2005 04:45:03 GMT |
This may be an easy idiom that I'm just not thinking of...
I have cases where I'd like to comment out lines in config files that
_don't_ match the new form.
For instance, I want to configure /etc/postfix/main.cf, and set
various fields to partiuclar values...
main_domain = ( cbbrowne.com )
editfiles:
{ /etc/postfix/main.cf
AppendIfNoSuchLine "myhostname=$(main_domain)"
HashCommentLinesContaining "^[^#]*myhostname=(NOT SURE WHAT)"
}
I'm not sure what regex is going to generally match "anything that's
not $(main_domain)".
Note that this idiom is also going to be real useful for /etc/hosts...
--
select 'cbbrowne' || '@' || 'gmail.com';
http://cbbrowne.com/info/lsf.html
"In the free software world, a rising tide DOES lift all boats, and
once the user has tasted Unix it's easy for them to switch between
Unices."
-- david parsons
X-Draft-From: ("nntp+wolfe:gnu.cfengine.help" 3567)
- Matching partial things with a reversal,
Christopher Browne <=