From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 18 00:00:25 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52987106567B for ; Tue, 18 Sep 2012 00:00:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 796358FC1C for ; Tue, 18 Sep 2012 00:00:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8I00Mj7009097 for ; Tue, 18 Sep 2012 00:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8I00MEq009096; Tue, 18 Sep 2012 00:00:22 GMT (envelope-from gnats) Resent-Date: Tue, 18 Sep 2012 00:00:22 GMT Resent-Message-Id: <201209180000.q8I00MEq009096@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Devin Teske Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42B41106566C for ; Mon, 17 Sep 2012 23:59:11 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4AE8FC08 for ; Mon, 17 Sep 2012 23:59:11 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8HNxBej073705 for ; Mon, 17 Sep 2012 23:59:11 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q8HNxAdj073704; Mon, 17 Sep 2012 23:59:10 GMT (envelope-from nobody) Message-Id: <201209172359.q8HNxAdj073704@red.freebsd.org> Date: Mon, 17 Sep 2012 23:59:10 GMT From: Devin Teske To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/171725: awk(1) does not support word-boundary metacharacters X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 00:00:25 -0000 >Number: 171725 >Category: bin >Synopsis: awk(1) does not support word-boundary metacharacters >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 18 00:00:21 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Devin Teske >Release: FreeBSD 9.0-RELEASE i386 >Organization: FIS Global, Inc. >Environment: FreeBSD push900.vicor.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: The awk(1) manual describes (quote) "regular expressions are as in egrep; see grep(1)." This leads one to believe that awk(1) supports both basic REs and extended REs. A discrepancy/gap has been found in this stated coverage. one-true-awk (our awk(1)) does not support the word-boundary metacharacters (\< and \>) for matching beginning- and ending-of-word. >How-To-Repeat: $ echo xxxa | awk '/xxx\>/{print}' ### this produces no output, as-is expected since ### the word "xxxa" does not end in "xxx" $ echo xxx | awk '/xxx\>/{print}' ### this too produces no output, indicating that ### \> is not a valid metacharacter for "end-of-word" >Fix: There are two proposed solutions. 1. Add a note to the awk(1) manual stating it does not support all RE metacharacters (note that '\<' and '\>' are valid both as BRE and ERE). or 2. Enhance awk(1) to support these BRE/ERE metacharacters so that the awk(1) manual is accurate without a patch. >Release-Note: >Audit-Trail: >Unformatted: