summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid A. Wheeler <dwheeler@dwheeler.com>2013-12-06 01:42:17 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2013-12-18 15:23:49 (GMT)
commit80a068d741b32850a45e815db90c4d92c636b157 (patch)
treeec21056d150be498817ddfab0f2ffd36ff725394
parente9355c43263efd8f9b31b83c4e2aeba4a82de75e (diff)
downloadbusybox-80a068d741b32850a45e815db90c4d92c636b157.tar.gz
busybox-80a068d741b32850a45e815db90c4d92c636b157.tar.bz2
sed: accept s///i as a synonym for s///I ("ignore case")
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--editors/sed.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 31fb103..e18e48a 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -381,7 +381,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
/*
* A substitution command should look something like this:
- * s/match/replace/ #gIpw
+ * s/match/replace/ #giIpw
* || | |||
* mandatory optional
*/
@@ -429,6 +429,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
break;
}
/* Ignore case (gnu exension) */
+ case 'i':
case 'I':
cflags |= REG_ICASE;
break;