From owner-freebsd-standards@FreeBSD.ORG Mon Dec 9 18:40:01 2013 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DEAC558 for ; Mon, 9 Dec 2013 18:40:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D448013D0 for ; Mon, 9 Dec 2013 18:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rB9Ie04A076761 for ; Mon, 9 Dec 2013 18:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rB9Ie0Xl076760; Mon, 9 Dec 2013 18:40:00 GMT (envelope-from gnats) Resent-Date: Mon, 9 Dec 2013 18:40:00 GMT Resent-Message-Id: <201312091840.rB9Ie0Xl076760@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "David A. Wheeler" Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5178C538 for ; Mon, 9 Dec 2013 18:38:31 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D79813BC for ; Mon, 9 Dec 2013 18:38:31 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rB9IcUOg094159 for ; Mon, 9 Dec 2013 18:38:30 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rB9IcUiA094158; Mon, 9 Dec 2013 18:38:30 GMT (envelope-from nobody) Message-Id: <201312091838.rB9IcUiA094158@oldred.freebsd.org> Date: Mon, 9 Dec 2013 18:38:30 GMT From: "David A. Wheeler" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: standards/184641: Please add "i" flag to sed substitute ("s") command X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 18:40:01 -0000 >Number: 184641 >Category: standards >Synopsis: Please add "i" flag to sed substitute ("s") command >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 09 18:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: David A. Wheeler >Release: N/A >Organization: >Environment: N/A >Description: Please add support for an "i" flag in sed's "s////" command to do case-insensitive matching, as a synonym for the current "I" flag. Case-insensitive matching is useful, but historically it hasn't been in POSIX. The POSIX folks have just accepted a proposal to add the "i" flag to do this. FreeBSD can already has this functionality, but it uses "I" not "i". By adding "i" as a synonym for "I", FreeBSD's sed would support the capability, and make it easier to port other code to FreeBSD. The POSIX decision is documented here: http://austingroupbugs.net/view.php?id=779 Thanks! >How-To-Repeat: sed -e 's/hi/hello/i' <Fix: I think this is trivial. This can probably be fixed by modifying sed's "compile.c" file, function compile_flags(), around line 585. Currently this is: case 'I': s->icase = 1; I think you can just prepend this line: case 'i': >Release-Note: >Audit-Trail: >Unformatted: