Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Feb 1999 13:36:42 +0000
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        Brendan Kosowski <brendan@bmk.com.au>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: grep question
Message-ID:  <19990227133642.B59481@scientia.demon.co.uk>
In-Reply-To: <Pine.BSF.3.96.990227191505.5605A-100000@garfield>
References:  <19990227050246.DFDD946381@pobox.com> <Pine.BSF.3.96.990227191505.5605A-100000@garfield>

next in thread | previous in thread | raw e-mail | index | archive | help
Brendan Kosowski wrote:

> FreeBSD will have to get you to write a new manual for grep.

No. This is nothing to do with grep really, you need to learn how your
shell interprets quote characters. If you say

$ grep 'the dog said "woof"' *

then grep doesn't see the outer ' marks. They just tell your shell to
pass what's between them as one argument. grep just sees what's between
them, and uses that as the expression to search for, like the grep man
page says. Read the manual pages for sh(1) and csh(1) about quoting. If
you're using bash or tcsh, for example, they should use similar rules to
sh and csh respectively, but you may like to check their pages too for
good measure.

-- 
Ben Smithurst
ben@scientia.demon.co.uk

send a blank message to ben+pgp@scientia.demon.co.uk for PGP key


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990227133642.B59481>