Re: grep question
On Mon, Apr 08, 2002 at 04:41:08PM +0200, Johann Spies wrote:
> In the grep's info page I find the following which works as said. But
> I want to know why. What does the [c] do in this case?
Simple: The regexp '[c]ron' matches the string 'cron', but not the
string '[c]ron'.
> ------------------------
> 7. Why do people use strange regular expressions on `ps' output?
>
> ps -ef | grep '[c]ron'
>
> If the pattern had been written without the square brackets, it
> would have matched not only the `ps' output line for `cron', but
> also the `ps' output line for `grep'.
--
Note that I use Debian version 3.0
Linux mus 2.4.17mvz4 #1 Fri Mar 15 23:30:15 CET 2002 i686 unknown
Matijs
"The site .co.uk wants to set a cookie.
Do you want to allow it?"
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: