[SunHELP] sed-help

Adrian.Florea at alcatel.ro Adrian.Florea at alcatel.ro
Wed Dec 11 01:03:13 CST 2002


I think the line:

perl -pi -e 's/86400/30/ if $_ =~ /Refresh/;' db.file

will do this .... if not ... please let me see the whole line.

Adrian FLOREA

On Wed, 11 Dec 2002, Sangbutsarakum, Patai wrote:

> What if, I need to modify that number only the line that has word 'Refresh'?
>
> Thanks,
>
> -----Original Message-----
> From: Kurt Huhn [mailto:kurt at k-huhn.com]
> Sent: Monday, December 09, 2002 21:01
> To: sunhelp at sunhelp.org
> Subject: Re: [SunHELP] sed-help
>
>
> Adrian.Florea at alcatel.ro wrote:
>
> > Try:
> >
> > perl -pi -e 's/86400/30/;' db.file
> >
> > it is easier and does not need to do by hand any temporaries.
> >
>
> Gah!!  A line of Perl I can read and understand!
>
> Much better solution, Adrian.
>
> (filed away for later use)
> --
> Kurt
> kurt at k-huhn.com
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp



More information about the SunHELP mailing list