[Top][All Lists]

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

Re: autoheader, fortran, and comments

From: Stepan Kasal
Subject: Re: autoheader, fortran, and comments
Date: Thu, 12 Apr 2007 17:03:02 +0200
User-agent: Mutt/

Hi John,

On Thu, Apr 12, 2007 at 05:52:41AM -0700, j y wrote:
> sed script, however, is slightly not what I wanted.  The , addressing will
> match until the first */ encountered AFTER the the line with the /*.

oh!  You are right, of course.

I was not aware that the semantics of ranges in sed is different than
in awk.  Awk does what I had in mind, so one possible fix would be to
        sed '/\/\*/,/\*\//s/^/!/'
        awk '/\/\*/,/\*\//{sub(/^/,"!")};{print}'

Have a nice day,

reply via email to

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