1 |
On Sat, May 24, 2008 at 11:22 AM, Robin Atwood |
2 |
<robin.atwood@×××××××××.net> wrote: |
3 |
> Regexs are not my strong point! I am trying to get a list of service scripts |
4 |
> that provide virtual services. Each such script contains a line like: |
5 |
> |
6 |
> provide dns |
7 |
> |
8 |
> i.e. the line starts with one or more spaces, followed by the text "provide", |
9 |
> followed by one or more spaces and a single word. i have come up with: |
10 |
> |
11 |
> grep -e ^\s+provide\s+\w /etc/init.d |
12 |
|
13 |
Right now you are saying: match one or more spaces in the begining |
14 |
followed by provide followed by one or more spaces followed by *one* |
15 |
word followed by one space and followed by /etc/init.d |
16 |
|
17 |
I think you mean: grep -e ^\s+provide\s+\w+ /etc/init.d |
18 |
> |
19 |
> but, as usual, nothing is matched. What am I doing wrong? |
20 |
> |
21 |
> TIA |
22 |
> -Robin |
23 |
> |
24 |
> |
25 |
> |
26 |
> |
27 |
> |
28 |
> |
29 |
> |
30 |
> |
31 |
> |
32 |
> |
33 |
> |
34 |
> |
35 |
> -- |
36 |
> gentoo-user@l.g.o mailing list |
37 |
> |
38 |
> |
39 |
-- |
40 |
gentoo-user@l.g.o mailing list |