[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: non-convergent file edit?
From: |
Jamie Wilkinson |
Subject: |
Re: non-convergent file edit? |
Date: |
Thu, 18 Mar 2004 00:30:16 +1100 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
This one time, at band camp, rader@ginseng.hep.wisc.edu wrote:
> > From: Jamie Wilkinson
> > editfiles:
> >
> > { /etc/motd
> > LocateLineMatching "year is [[:digit:]]{4}"
> > ReplaceLineWith "year is $(year)
> > }
> >
> > If your script is convergent it will only happen once anyway.
>
>Sorry, doesn't work for me. In perl terms, I want...
>
> s/year is \d{4}/year is $year/
>
>or more verbosely...
Let me put it this way: the above editfiles construct is close to what
you're after, working out the details of the regex is up to you.
--
jaq@spacepants.org http://spacepants.org/jaq.gpg
- Re: non-convergent file edit?, (continued)