Re: [CentOS] text processing problem with bash/perl

2009-02-13 Thread David G. Miller
Dennis Kaptain wrote: >> > >> > Hi, >> > >> > Anyone has some ways for the following text processing problem? I have a >> > text >> > file containing two stanzas attached below. I want to uncomment the stanza >> > with >> > 'host=localhost' line, while left the other stanza unchanged. >> >

Re: [CentOS] text processing problem with bash/perl

2009-02-13 Thread Robinson Tiemuqinke
Dave, Thanks a lot. --Robinson --- On Fri, 2/13/09, Dave Cross wrote: > From: Dave Cross > Subject: Re: [CentOS] text processing problem with bash/perl > To: "CentOS mailing list" > Date: Friday, February 13, 2009, 5:50 AM > 2009/2/13 Robinson Tiemuqinke : > &

Re: [CentOS] text processing problem with bash/perl

2009-02-13 Thread Dennis Kaptain
> > # Put Perl in "paragraph mode" > $/ = ''; > > # For each record ... I love this list! Paragraph mode REALLY cleans things up. Although it worked, this makes my first attempt look really amateurish. Be sure to put the definition of $/ inside a code block { } if you are using it inside a p

Re: [CentOS] text processing problem with bash/perl

2009-02-13 Thread Dave Cross
2009/2/13 Robinson Tiemuqinke : > Hi, > > Anyone has some ways for the following text processing problem? I have a text > file > containing two stanzas attached below. I want to uncomment the stanza with > 'host=localhost' line, while left the other stanza unchanged. > > ... > > /* udp_send_channe

Re: [CentOS] text processing problem with bash/perl

2009-02-12 Thread Dennis Kaptain
> > Hi, > > Anyone has some ways for the following text processing problem? I have a text > file containing two stanzas attached below. I want to uncomment the stanza > with > 'host=localhost' line, while left the other stanza unchanged. > > ... > > /* udp_send_channel { > host=localhost