gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] new version hook script examples


From: Zenaan Harkness
Subject: Re: [Gnu-arch-users] new version hook script examples
Date: Sun, 26 Sep 2004 10:13:30 +1000

On Sun, 2004-09-26 at 03:47, Stig Brautaset wrote:
> On Sat, Sep 25, 2004 at 12:26:54PM +1000, Zenaan Harkness wrote:
> > sed -e "s/$VERSION_SED_STRING/$RELEASE_DATE/" D.java > D.java
> 
> I'm surprised if this works as you (seem to) expect. I worry that the
> redirection will nuke the content of the file before it is opened by
> sed. Either use (relatively) recent gnu sed with the -i flag or
> something like this:
> 
> sed -e "s/$VERSION_SED_STRING/$RELEASE_DATE/" D.java > ,D.java && \
>   mv ,D.java D.java

I was thinking that too you know ... but empirically, it works,
so I never bothered adding the redirection.

cheers
zen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]