On Saturday 24 May 2008, Andrey Falko wrote:
> On Sat, May 24, 2008 at 11:32 AM, Andrey Falko <[EMAIL PROTECTED]> wrote:
> > On Sat, May 24, 2008 at 11:22 AM, Robin Atwood
> >
> > <[EMAIL PROTECTED]> wrote:
> >> Regexs are not my strong point! I am trying to get a list of service
> >> scripts that provide virtual services. Each such script contains a line
> >> like:
> >>
> >>        provide dns
> >>
> >> i.e. the line starts with one or more spaces, followed by the text
> >> "provide", followed by one or more spaces and a single word. i have come
> >> up with:
> >>
> >>         grep -e ^\s+provide\s+\w /etc/init.d
> >
> > Right now you are saying: match one or more spaces in the begining
> > followed by provide followed by one or more spaces followed by *one*
> > word followed by one space and followed by /etc/init.d
> >
> > I think you mean: grep -e ^\s+provide\s+\w+ /etc/init.d
> >
> >> but, as usual, nothing is matched. What am I doing wrong?
>
> I see your mistake....\w means alphanumeric character, not word.

I had just realised that myself. However, it still doesn't work. :( 
Thanks for trying, though.

-Robin










-- 
gentoo-user@lists.gentoo.org mailing list

Reply via email to