From 8a85cab6e5e4d7f475f9bc969b75162ea21299cc Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Mon, 9 Dec 2013 14:19:39 -0500 Subject: [PATCH] sed(1): Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i' as a case insensitive flag. Obtained-from: FreeBSD r259132 --- usr.bin/sed/compile.c | 1 + usr.bin/sed/sed.1 | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index ad4671f30b..72c5cf572b 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -576,6 +576,7 @@ compile_flags(char *p, struct s_subst *s) case 'p': s->p = 1; break; + case 'i': case 'I': s->icase = 1; break; diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1 index dcf051b6ca..7c6939acfb 100644 --- a/usr.bin/sed/sed.1 +++ b/usr.bin/sed/sed.1 @@ -31,7 +31,7 @@ .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD: src/usr.bin/sed/sed.1,v 1.50 2009/05/25 21:29:06 brian Exp $ .\" -.Dd June 13, 2009 +.Dd December 9, 2013 .Dt SED 1 .Os .Sh NAME @@ -193,7 +193,7 @@ a context address that consists of a regular expression preceded and followed by a delimiter. The closing delimiter can also optionally be followed by the -.Dq I +.Dq i character, to indicate that the regular expression is to be matched in a case-insensitive way. .El @@ -504,7 +504,7 @@ Append the pattern space to if a replacement was made. If the replacement string is identical to that which it replaces, it is still considered to have been a replacement. -.It I +.It i or I Match the regular expression in a case-insensitive way. .El .Pp -- 2.41.0