Template Version: @(#)sac_nextcase 1.69 02/15/10 SMI This information is Copyright 2010 Sun Microsystems 1. Introduction 1.1. Project/Component Working Name: open source sed 1.2. Name of Document Author/Supplier: Author: Olga Kryzhanovska 1.3 Date of This Document: 10 March, 2010 4. Technical Description
I'm sponsoring this fast-track request on behalf of the POSIX utility community and shell project. Please note that this is an *open* case. The release binding is the same as with the ksh93 project: a patch/micro release of Solaris delivering through ON Stability levels are as described below. This project is an amendment to the Korn Shell 93 Integration project (PSARC/2006/550 and PSARC/2007/035, PSARC/2008/094, PSARC/2008/344 and PSARC/2008/589) specifying the following additional interfaces: Provide an opensource version of /usr/bin/sed and /usr/xpg4/bin/sed This case proposes to deliver the following features as a set of independent putbacks as they become available. Each feature is self contained and independent of the others, so out of order and partial putbacks at this granularity should have no adverse impact on the functionality and behavior of the system as a whole. Bug/RFE Number(s): 6687656 RFE: Provide an opensource version of /usr/bin/sed and /usr/xpg4/bin/sed Interface Stability Description --------- --------- ----------- /usr/bin/sed See man page sed command /usr/xpg4/bin/sed See man page sed command ksh93 builtin /usr/xpg4/bin/sed See man page sed command The following options will be supported additionally to the existing -n, -e, -f options for BSD and GNU compatibility: -b, --strip-blanks Strip leading blanks from a, c, and i text. -e, --expression=script Append the editing commands in script to the end of the the editing command script. script may contain more than one newline separated command. -f, --file=script-file Append the editing commands in script-file to the end of the the editing command script. -n, --quiet|silent Suppress the default output in which each line, after it is examined for editing, is written to standard output. Only lines explicitly selected for output will be written. -A|X, --augmented Enable augmented regular expressions; this includes negation and conjunction, i.e. xgrep(1) style -E|r, --extended|regexp-extended Enable extended regular expressions, i.e., egrep(1) style. -O, --lenient Enable lenient regular expression interpretation. This is the default for /usr/bin/sed -S, --strict|posix Enable strict regular expression interpretation. This is the default for /usr/xpg4/bin/sed -m multi-digit-reference?Enable \dd multi-digit backreferences. -d Ignored by this implementation for BSD compatibility. -u, --unbuffered Unbuffered output. The interface stability of the new options is described in the manual page. Notes ----- 1. Multibyte character support in /usr/bin/sed Previous implementations of /usr/bin/sed had unspecified behaviour if multibyte characters are encountered. Part are they handled as multibyte characters, part are they handled as bytes and part are they handled as input from outer space (random values). To fix this situation the new implementation will treat multibyte characters as characters. The old behaviour can be emulated by invoking sed with LC_ALL=C sed <options> <file>. This will treat all input as bytes. 2. Compatibility of old and new /usr/bin/sed implementations: Modulo correction of the bug as in the NOTES, we believe that this new version can act as a 100% compatible drop in for the legacy sed programs. Future directions ----------------- A future case will add /usr/bin/sedcomp to provide a sed script compiler. Materials: - Man page for sed.1: Original: manpage_sed_1_old.txt New: manpage_sed_1_new.txt 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: ON 6.5. ARC review type: FastTrack 6.6. ARC Exposure: open