From owner-freebsd-questions Wed May 8 8: 8:37 2002 Delivered-To: freebsd-questions@freebsd.org Received: from blacklamb.mykitchentable.net (ekgr-dsl2-92.citlink.net [207.173.226.92]) by hub.freebsd.org (Postfix) with ESMTP id 3B1DC37B404 for ; Wed, 8 May 2002 08:08:30 -0700 (PDT) Received: from tagalong (unknown [165.107.42.110]) by blacklamb.mykitchentable.net (Postfix) with SMTP id 079CFEE644 for ; Wed, 8 May 2002 08:08:29 -0700 (PDT) Message-ID: <001a01c1f6a2$35d4adf0$6e2a6ba5@lc.ca.gov> From: "Drew Tomlinson" To: Subject: Basic RegEx Syntax Help - grep Date: Wed, 8 May 2002 08:08:28 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm trying to grep the output of pkg_info to show me lines containing "libglade" OR "rep-gtk". In reading the man page, I see that | is the "infix" (OR) operator. What is the correct syntax to use this command? Everyway I have tried it, the shell sees | as a pipe and not the infix operator. Here's some of the commands I've tried: milkmaker# pkg_info | grep libglade|rep-gtk rep-gtk: Command not found. milkmaker# pkg_info | grep "libglade"|"rep-gtk" rep-gtk: Command not found. milkmaker# pkg_info | grep ['libglade'|'rep-gtk'] grep: Unmatched [ or [^ milkmaker# pkg_info | grep [libglade|rep-gtk] grep: Unmatched [ or [^ milkmaker# pkg_info | grep [libglade] | [rep-gtk] grep: No match. [rep-gtk]: No match. Help! :) Thanks, Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message