From owner-freebsd-hackers Tue Jul 6 16:20:56 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from phoenix.volant.org (phoenix.volant.org [205.179.79.193]) by hub.freebsd.org (Postfix) with ESMTP id 8EBA614C8E for ; Tue, 6 Jul 1999 16:20:48 -0700 (PDT) (envelope-from patl@phoenix.volant.org) Received: from asimov.phoenix.volant.org ([205.179.79.65]) by phoenix.volant.org with smtp (Exim 1.92 #8) id 111eW1-0004pP-00; Tue, 6 Jul 1999 16:20:41 -0700 Received: from localhost by asimov.phoenix.volant.org (SMI-8.6/SMI-SVR4) id QAA13212; Tue, 6 Jul 1999 16:20:38 -0700 Date: Tue, 6 Jul 1999 16:20:38 -0700 (PDT) From: patl@phoenix.volant.org Reply-To: patl@phoenix.volant.org Subject: Re: Repalcement for grep(1) To: Jamie Howard Cc: archie@whistle.com, freebsd-hackers@FreeBSD.org, tech-userlevel@netbsd.org, tech@openbsd.org In-Reply-To: <199907051807.LAA54803@bubba.whistle.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jamie Howard writes: > > Perhaps this will help with -w? > > Yes, I received a patch from Simon Burge which implements this. It also > beats using [^A-Za-z] and [A-Za-z$] as I was and GNU grep does. I am > still having trouble with -x though. It turns out that even if I specify > a commandline with a pattern of the form "^pattern$", it fails. If I > specify "^pattern" it works. If I specify "pattern$" it does not. I > have yet to find a case where my version will sucessfully match when a $ > is at the end. Has anyone encountered anything like this before? If you are using double quotes, as you show here, the shell may be attempting a variable substitution. Try single quotes. -Pat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message