--- manpage_sed_1_old.txt Thu Mar 11 00:18:36 2010 +++ manpage_sed_1_new.txt Thu Mar 11 01:20:29 2010 @@ -9,20 +9,14 @@ sed - stream editor SYNOPSIS - /usr/bin/sed [-n] script [file]... + /usr/bin/sed [ options ] [file]... - /usr/bin/sed [-n] [-e script]... [-f script_file]... - [file]... + /usr/xpg4/bin/sed [ options ] [file]... - /usr/xpg4/bin/sed [-n] script [file]... + ksh93 sed [ options ] [file]... - - /usr/xpg4/bin/sed [-n] [-e script]... [-f script_file]... - [file]... - - DESCRIPTION The sed utility is a stream editor that reads one or more text files, makes editing changes according to a script of @@ -38,23 +32,41 @@ OPTIONS The following options are supported: + -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. + - -e script script is an edit command for sed. See - USAGE below for more information on the - format of script. If there is just one -e - option and no -f options, the flag -e may - be omitted. - - -f script_file Takes the script from script_file. - script_file consists of editing commands, - one per line. - - - -n Suppresses the default output. - - - Multiple -e and -f options may be specified. All commands are added to the script in the order specified, regardless of their origin. @@ -111,9 +123,10 @@ input lines cumulatively across files, a $ that addresses the last line of input, or a context address, which consists of a /regular expression/ as described on the regexp(5) - manual page. + (for /usr/bin/sed) and regex(5) (for /usr/xpg4/bin/sed) + manual page. Options -A, -E, -X will set a different + regular expression syntax. - A command line with no addresses selects every pattern space. @@ -137,7 +150,9 @@ sed Regular Expressions sed supports the basic regular expressions described on the - regexp(5) manual page, with the following additions: + regexp(5) (for /usr/bin/sed) and regex(5) (for /usr/xpg4/bin/sed) + manual page unless options -A/-E/-X are enabled, with the + following additions: \cREc In a context address, the construction \cREc, where c is any character other than a backslash @@ -518,7 +533,7 @@ |_____________________________|_____________________________| | Availability | SUNWcsu | |_____________________________|_____________________________| - | CSI | Not enabled | + | CSI | Enabled | |_____________________________|_____________________________| @@ -530,13 +545,30 @@ |_____________________________|_____________________________| | CSI | Enabled | |_____________________________|_____________________________| - | Interface Stability | Standard | + | Interface Stability | See below | |_____________________________|_____________________________| + Interface stability: + Options -n, -e, -f are Committed for /usr/bin/sed and Standard + for /usr/xpg4/bin/sed + Options -A, -E, -X, -u are Committed + All other options are Uncommited interfaces +NOTES + Previous implementations of /usr/bin/sed had unspecified behaviour + if multibyte characters are encountered. The old behaviour can + be emulated by invoking sed with LC_ALL=C sed . + + Previous implementations of /usr/bin/sed used the regexp(5) API + and /usr/xpg4/bin/sed used the regex(5) API. The new + implementation of /usr/bin/sed uses the regex(5) API in a + lenient regular expression interpretation mode to ensure + backwards compatibility. + SEE ALSO - awk(1), ed(1), grep(1), attributes(5), environ(5), large- - file(5), regexp(5), standards(5) + awk(1), ed(1), grep(1), ksh93(1), xgrep(1) attributes(5), + environ(5), largefile(5), regex(5), regexp(5), standards(5), + http://www.opengroup.org/onlinepubs/000095399/utilities/sed.html