[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need 'UncommentAndSetValue' or some such
From: |
Brendan Strejcek |
Subject: |
Re: Need 'UncommentAndSetValue' or some such |
Date: |
Thu, 27 Oct 2005 07:59:37 -0500 |
User-agent: |
Mutt/1.5.6+20040818i |
Alexander Jolk wrote:
> Christopher Browne wrote:
> >I'd *love* to have something that would say something like...
> >
> > AssignField LHS="com.foo.bar.jdbc.url"
> > RHS="pgsql:$(dbhost):$(dbport):$(dbuser)"
> > separator="="
>
> Did someone consider code along the lines of
> SplitOn = ( = )
> SetLine "com.foo.bar.jdbc.url=pgsql:somehost:5432:user"
> ReplaceLinesMatchingField "1"
> ?
That assumes the line already exists. I think this does what most people
want:
AppendIfNoSuchLine "com.foo.bar.jdbc.url=gak"
SplitOn = ( = )
SetLine "com.foo.bar.jdbc.url=pgsql:somehost:5432:user"
ReplaceLinesMatchingField "1"
Also, since SplitOn must be a single character, it does not work for
assignments that use more than one character, such as " = " or ":=" .
Best,
Brendan
--
Senior System Administrator
The University of Chicago
Department of Computer Science
http://www.cs.uchicago.edu/people/brendan
- Re: Need 'UncommentAndSetValue' or some such, (continued)
- Re: Need 'UncommentAndSetValue' or some such, Alexander Jolk, 2005/10/28
- Re: Need 'UncommentAndSetValue' or some such, Chip Seraphine, 2005/10/27
- Re: Need 'UncommentAndSetValue' or some such, Tim Nelson, 2005/10/27
- Re: Need 'UncommentAndSetValue' or some such, Mark Burgess, 2005/10/28
- Re: Need 'UncommentAndSetValue' or some such, Josh Lothian, 2005/10/28
- Re: Need 'UncommentAndSetValue' or some such, Mark Burgess, 2005/10/28
Message not available
Message not availableRe: Need 'UncommentAndSetValue' or some such, Christopher Browne, 2005/10/27
RE: Need 'UncommentAndSetValue' or some such, David Masterson, 2005/10/28
RE: Need 'UncommentAndSetValue' or some such, David Masterson, 2005/10/28