From: | Wolf Canis <wolf.canis@××××××××××.com> | ||
---|---|---|---|
To: | gentoo-user@l.g.o | ||
Subject: | Re: [gentoo-user] Need help with a regex | ||
Date: | Sat, 24 May 2008 16:04:50 | ||
Message-Id: | 48383C67.8030104@googlemail.com | ||
In Reply to: | [gentoo-user] Need help with a regex by Robin Atwood |
1 | Robin Atwood wrote: |
2 | > grep -e ^\s+provide\s+\w /etc/init.d |
3 | > |
4 | > but, as usual, nothing is matched. What am I doing wrong? |
5 | |
6 | You have to use back slashed versions of metacharacters. Following |
7 | how would do that: |
8 | |
9 | $ grep -e '^[[:space:]]\+provide[[:space:]]\+[a-z]\+' /etc/init.d/* |
10 | /etc/init.d/syslog-ng: provide logger |
11 | /etc/init.d/vixie-cron: provide cron |
12 | |
13 | |
14 | W. Canis |
File name | MIME type |
---|---|
signature.asc | application/pgp-signature |