On Mon, 11 Oct 2004, Ramprasad A Padmanabhan wrote:
> On Mon, 2004-10-11 at 16:23, Urs Wagner wrote:
> >
> > I should comment out lines in a text file. I have a lot of troubles
> > to realize this.
> >
> > The lines
> > Alpha(a, b, c)
> > should be changed to
> > # Alpha(a, b, c)
>
> perl -pli
}
}
Arjun
-Original Message-
From: Urs Wagner [mailto:[EMAIL PROTECTED]
Sent: Monday, October 11, 2004 4:24 PM
To: [EMAIL PROTECTED]
Subject: Line replace
Hello
I should comment out lines in a text file. I have a lot of troubles to
realize this.
The lines
Alpha(a, b, c)
should be changed t
Good one liner I appreciate it ..
Arjun
-Original Message-
From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED]
Sent: Monday, October 11, 2004 4:41 PM
To: Urs Wagner
Cc: perl beginners
Subject: Re: Line replace
On Mon, 2004-10-11 at 16:23, Urs Wagner wrote:
> Hello
&g
On Mon, 2004-10-11 at 16:23, Urs Wagner wrote:
> Hello
>
> I should comment out lines in a text file. I have a lot of troubles to
> realize this.
>
> The lines
> Alpha(a, b, c)
> should be changed to
> # Alpha(a, b, c)
>
perl -pli.BAK -e 's/(?=.*Alpha\(a, b ,c\))/#/' FILENAME
HTH
Ram
--
Hello
I should comment out lines in a text file. I have a lot of troubles to
realize this.
The lines
Alpha(a, b, c)
should be changed to
# Alpha(a, b, c)
What I would like to write is a small perl script to make this convetion.
Thanks
Urs
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additiona