Austin Group Defect Tracker

Aardvark Mark III

Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000779 [1003.1(2008)/Issue 7] Shell and Utilities Objection Enhancement Request 2013-10-28 22:00 2013-12-05 17:31
Reporter dwheeler View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Resolved  
Name David A Wheeler
User Reference
Section sed
Page Number 3184
Line Number 106510
Interp Status ---
Final Accepted Text See Note: 0002050
Summary 0000779: Add "ignore case" flag to sed's "s": s/old/new/I
Description Currently the POSIX standard provides no "ignore case" flag for sed's substitute (s) command. Yet case-insensitive matching is useful. The regcomp() function already supports this via the flag REG_ICASE (see POSIX 2013, page 1783). As noted in one sed FAQ (, [^] without this capability "case-insensitive searching is awkward".

GNU sed, FreeBSD sed, and Busybox sed all support case-insensitive matching using the "I" (capital I) flag:
* [^]
* [^]
* [^] (line 421)

FreeBSD and busybox only support "I" as the flag, not "i". GNU sed actually supports both "i" and "I". However, since FreeBSD only supports "I", I propose that one. Note that one sed tutorial ( [^] only notes "I" with GNU sed, so that seems to be the more popular choice. Note, however, that perl uses "i" not "I" - so there is some argument for "i". If people want to use "i" as the flag instead of "I" that's fine with me. We just need to pick a flag so sed scripts can port.
Desired Action After line 106510, add:

I Match the regular expression in a case-insensitive way.

Tags issue8
Attached Files

- Relationships

-  Notes
nick (manager)
2013-12-05 17:30
edited on: 2013-12-05 17:31

After line 106510, add:

i Match the regular expression in a case-insensitive way.

Add new para to APPLICATION USAGE after line 106550:
Note that some implementations of sed also support an 'I' flag for the 's' command as an alias for the lower case 'i' flag.

- Issue History
Date Modified Username Field Change
2013-10-28 22:00 dwheeler New Issue
2013-10-28 22:00 dwheeler Status New => Under Review
2013-10-28 22:00 dwheeler Assigned To => ajosey
2013-10-28 22:00 dwheeler Name => Your Name Here
2013-10-28 22:00 dwheeler Section => sed
2013-10-28 22:00 dwheeler Page Number => 3184
2013-10-28 22:00 dwheeler Line Number => 106510
2013-12-05 17:24 nick Tag Attached: issue8
2013-12-05 17:30 nick Interp Status => ---
2013-12-05 17:30 nick Note Added: 0002050
2013-12-05 17:30 nick Resolution Open => Accepted As Marked
2013-12-05 17:31 nick Name Your Name Here => David A Wheeler
2013-12-05 17:31 nick Final Accepted Text => See Note: 0002050
2013-12-05 17:31 nick Status Under Review => Resolved
2013-12-05 17:31 nick Note Edited: 0002050
2013-12-05 17:31 nick Note Edited: 0002050
2013-12-09 18:47 eadler Issue Monitored: eadler

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker