• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Sed 4.2.1
2
3* fix parsing of s/[[[[[[[[[]//
4
5* security contexts are preserved by -i too under SELinux
6
7* temporary files for sed -i are not made group/world-readable until
8  they are complete
9
10----------------------------------------------------------------------------
11Sed 4.2
12
13* now released under GPLv3
14
15* added a new extension `z` to clear pattern space even in the presence
16of invalid multibyte sequences
17
18* a preexisting GNU gettext installation is needed in order to compile
19GNU sed with NLS support
20
21* new option --follow-symlinks, available when editing a file in-place.
22This option may not be available on some systems (in this case, the
23option will *not* be a no-op; it will be completely unavailable).
24In the future, the option may be added as a no-op on systems without
25symbolic links at all, since in this case a no-op is effectively
26indistinguishable from a correct implementation.
27
28* hold-space is reset between different files in -i and -s modes.
29
30* multibyte processing fixed
31
32* the following GNU extensions are turned off by --posix: options [iImMsSxX]
33in the `s' command, address kinds `FIRST~STEP' and `ADDR1,+N' and `ADDR1,~N',
34line address 0, `e' or `z' commands, text between an `a' or `c' or `i'
35command and the following backslash, arguments to the `l' command.
36--posix disables all extensions to regular expressions.
37
38* fixed bug in 'i\' giving a segmentation violation if given alone.
39
40* much improved portability
41
42* much faster in UTF-8 locales
43
44* will correctly replace ACLs when using -i
45
46* will now accept NUL bytes for `.'
47
48----------------------------------------------------------------------------
49Sed 4.1.5
50
51* fix parsing of a negative character class not including a closed bracket,
52  like [^]] or [^]a-z].
53
54* fix parsing of [ inside an y command, like y/[/A/.
55
56* output the result of commands a, r, R when a q command is found.
57
58----------------------------------------------------------------------------
59Sed 4.1.4
60
61* \B correctly means "not on a word boundary" rather than "inside a word"
62
63* bugfixes for platform without internationalization
64
65* more thorough testing framework for tarballs (`make full-distcheck')
66
67----------------------------------------------------------------------------
68Sed 4.1.3
69
70* regex addresses do not use leftmost-longest matching.  In other words,
71  /.\+/ only looks for a single character, and does not try to find as
72  many of them as possible like it used to do.
73
74* added a note to BUGS and the manual about changed interpretation
75  of `s|abc\|def||', and about localization issues.
76
77* fixed --disable-nls build problems on Solaris.
78
79* fixed `make check' in non-English locales.
80
81* `make check' tests the regex library by default if the included regex
82  is used (regex tests had to be enabled separately up to now).
83
84----------------------------------------------------------------------------
85Sed 4.1.2
86
87* fix bug in 'y' command in multi-byte character sets
88
89* fix severe bug in parsing of ranges with an embedded open bracket
90
91* fix off-by-one error when printing a "bad command" error
92
93----------------------------------------------------------------------------
94Sed 4.1.1
95
96* preserve permissions of in-place edited files
97
98* yield an error when running -i on terminals or other non regular files
99
100* do not interpret - as stdin when running in in-place editing mode
101
102* fix bug that prevented 's' command modifiers from working
103
104----------------------------------------------------------------------------
105Sed 4.1
106
107* // matches the last regular expression even in POSIXLY_CORRECT mode.
108
109* change the way we treat lines which are not terminated by a newline.
110Such lines are printed without the terminating newline (as before)
111but as soon as more text is sent to the same output stream, the
112missing newline is printed, so that the two lines don't concatenate.
113The behavior is now independent from POSIXLY_CORRECT because POSIX
114actually has undefined behavior in this case, and the new implementation
115arguably gives the ``least expected surprise''.  Thanks to Stepan
116Kasal for the implementation.
117
118* documentation improvements, with updated references to the POSIX.2
119specification
120
121* error messages on I/O errors are better, and -i does not leave temporary
122files around (e.g. when running ``sed -i'' on a directory).
123
124* escapes are accepted in the y command (for example: y/o/\n/ transforms
125o's into newlines)
126
127* -i option tries to set the owner and group to the same as the input file
128
129* `L' command is deprecated and will be removed in sed 4.2.
130
131* line number addresses are processed differently -- this is supposedly
132conformant to POSIX and surely more idiot-proof.  Line number addresses
133are not affected by jumping around them: they are activated and
134deactivated exactly where the script says, while previously
135    5,8b
136    1,5d
137would actually delete lines 1,2,3,4 and 9 (!).
138
139* multibyte characters are taken in consideration to compute the
140operands of s and y, provided you set LC_CTYPE correctly.  They are
141also considered by \l, \L, \u, \U, \E.
142
143* [\n] matches either backslash or 'n' when POSIXLY_CORRECT.
144
145* new option --posix, disables all GNU extensions.  POSIXLY_CORRECT only
146disables GNU extensions that violate the POSIX standard.
147
148* options -h and -V are not supported anymore, use --help and --version.
149
150* removed documentation for \s and \S which worked incorrectly
151
152* restored correct behavior for \w and \W: match [[:alnum:]_] and
153[^[:alnum:]_] (they used to match [[:alpha:]_] and [^[:alpha:]_]
154
155* the special address 0 can only be used in 0,/RE/ or 0~STEP addresses;
156other cases give an error (you are hindering portability for no reason
157if specifying 0,N and you are giving a dead command if specifying 0
158alone).
159
160* when a \ is used to escape the character that would terminate an operand
161of the s or y commands, the backslash is removed before the regex is
162compiled.  This is left undefined by POSIX; this behavior makes `s+x\+++g'
163remove occurrences of `x+', consistently with `s/x\///g'.  (However, if
164you enjoy yourself trying `s*x\***g', sed will use the `x*' regex, and you
165won't be able to pass down `x\*' while using * as the delimiter; ideas on
166how to simplify the parser in this respect, and/or gain more coherent
167semantics, are welcome).
168
169
170----------------------------------------------------------------------------
171Sed 4.0.9
172
173* 0 address behaves correctly in single-file (-i and -s) mode.
174
175* documentation improvements.
176
177* tested with many hosts and compilers.
178
179* updated regex matcher from upstream, with many bugfixes and speedups.
180
181* the `N' command's feature that is detailed in the BUGS file was disabled
182by the first change below in sed 4.0.8.  The behavior has now been
183restored, and is only enabled if POSIXLY_CORRECT behavior is not
184requested.
185
186----------------------------------------------------------------------------
187Sed 4.0.8
188
189* fix `sed n' printing the last line twice.
190
191* fix incorrect error message for invalid character classes.
192
193* fix segmentation violation with repeated empty subexpressions.
194
195* fix incorrect parsing of ^ after escaped (.
196
197* more comprehensive test suite (and with many expected failures...)
198
199----------------------------------------------------------------------------
200Sed 4.0.7
201
202* VPATH builds working on non-glibc machines
203
204* fixed bug in s///Np: was printing even if less than N matches were
205found.
206
207* fixed infinite loop on s///N when LHS matched a null string and
208there were not enough matches in pattern space
209
210* behavior of s///N is consistent with s///g when the LHS can match
211a null string (and the infinite loop did not happen :-)
212
213* updated some translations
214
215----------------------------------------------------------------------------
216Sed 4.0.6
217
218* added parameter to `v' for the version of sed that is expected.
219
220* configure switch --without-included-regex to use the system regex matcher
221
222* fix for -i option under Cygwin
223
224----------------------------------------------------------------------------
225Sed 4.0.5
226
227* portability fixes
228
229* improvements to some error messages (e.g. y/abc/defg/ incorrectly said
230`excess characters after command' instead of `y arguments have different
231lengths')
232
233* `a', `i', `l', `L', `r' accept two addresses except in POSIXLY_CORRECT
234mode.  Only `q' and `Q' do not accept two addresses in standard (GNU) mode.
235
236----------------------------------------------------------------------------
237Sed 4.0.4
238
239* documentation fixes
240
241* update regex matcher
242
243----------------------------------------------------------------------------
244Sed 4.0.3
245
246* fix packaging problem (two missing translation catalogs)
247
248----------------------------------------------------------------------------
249Sed 4.0.2
250
251* more translations
252
253* fix build problems (vpath builds and bootstrap builds)
254
255----------------------------------------------------------------------------
256Sed 4.0.1
257
258* Remove last vestiges of super-sed
259
260* man page automatically built
261
262* more translations provided
263
264* portability improvements
265
266----------------------------------------------------------------------------
267Sed 4.0
268
269* Update regex matcher
270
271----------------------------------------------------------------------------
272Sed 3.96
273
274* `y' command supports multibyte character sets
275
276* Update regex matcher
277
278----------------------------------------------------------------------------
279Sed 3.95
280
281* `R' command reads a single line from a file.
282
283* CR-LF pairs are always ignored under Windows, even if (under Cygwin)
284a disk is mounted as binary.
285
286* More attention to errors on stdout
287
288* New `W' command to write first line of pattern space to a file
289
290* Can customize line wrap width on single `l' commands
291
292* `L' command formats and reflows paragraphs like `fmt' does.
293
294* The test suite makefiles are better organized (this change is
295transparent however).
296
297* Compiles and bootstraps out-of-the-box under MinGW32 and Cygwin.
298
299* Optimizes cases when pattern space is truncated at its start or at
300its end by `D' or by a substitution command with an empty RHS.
301For example scripts like this,
302
303    seq 1 10000 | tr \\n \  | ./sed ':a; s/^[0-9][0-9]* //; ta'
304
305whose behavior was quadratic with previous versions of sed, have
306now linear behavior.
307
308* New command `e' to pipe the output of a command into the output
309of sed.
310
311* New option `e' to pass the output of the `s' command through the
312Bourne shell and get the result into pattern space.
313
314* Switched to obstacks in the parser -- less memory-related bugs
315(there were none AFAIK but you never know) and less memory usage.
316
317* New option -i, to support in-place editing a la Perl.  Usually one
318had to use ed or, for more complex tasks, resort to Perl; this is
319not necessary anymore.
320
321* Dumped buffering code.  The performance loss is 10%, but it caused
322bugs in systems with CRLF termination.  The current solution is
323not definitive, though.
324
325* Bug fix: Made the behavior of s/A*/x/g (i.e. `s' command with a
326possibly empty LHS) more consistent:
327
328       pattern               GNU sed 3.x       GNU sed 4.x
329        B                      xBx               xBx
330        BC                     xBxCx             xBxCx
331        BAC                    xBxxCx            xBxCx
332        BAAC                   xBxxCx            xBxCx
333
334* Bug fix: the // empty regular expressions now refers to the last
335regular expression that was matched, rather than to the last
336regular expression that was compiled.  This richer behavior seems
337to be the correct one (albeit neither one is POSIXLY_CORRECT).
338
339* Check for invalid backreferences in the RHS of the `s' command
340(e.g. s/1234/\1/)
341
342* Support for \[lLuUE] in the RHS of the `s' command like in Perl.
343
344* New regular expression matcher
345
346* Bug fix: if a file was redirected to be stdin, sed did not consume
347it.  So
348      (sed d; sed G) < TESTFILE
349
350double-spaced TESTFILE, while the equivalent `useless use of cat'
351      cat TESTFILE | (sed d; sed G)
352
353printed nothing (which is the correct behavior).  A test for this
354bug was added to the test suite.
355
356* The documentation is now much better, with a few examples provided,
357and a thorough description of regular expressions.  The manual often
358refers to "GNU extensions", but if they are described here they are
359specific to this version.
360
361* Documented command-line option:
362  -r, --regexp-extended
363    Use extended regexps -- e.g. (abc+) instead of \(abc\+\)
364
365* Added feature to the `w' command and to the `w' option of the `s'
366command: if the file name is /dev/stderr, it means the standard
367error (inspired by awk); and similarly for /dev/stdout.  This is
368disabled if POSIXLY_CORRECT is set.
369
370* Added `m' and `M' modifiers to `s' command for multi-line
371matching (Perl-style); in addresses, only `M' works.
372
373* Added `Q' command for `silent quit'; added ability to pass
374an exit code from a sed script to the caller.
375
376* Added `T' command for `branch if failed'.
377
378* Added `v' command, which is a do-nothing intended to fail on
379seds that do not support GNU sed 4.0's extensions.
380
381----------------------------------------------------------------------------
382Sed 3.02.80
383
384* Started new version nomenclature for pre-3.03 releases.  (I'm being
385pessimistic in assuming that .90 won't give me enough breathing room.)
386
387* Bug fixes: the regncomp()/regnexec() interfaces proved to be inadequate to
388properly handle expressions such as "s/\</#/g".  Re-abstracted the regex
389code in the sed/ tree, and now use the re_search_2() interface to the GNU
390regex routines.  This change also fixed a bug where /./ did not match the
391NUL character.  Had the glibc folk fix a bug in lib/regex.c where
392's/0*\([0-9][0-9]\)/X\1X/' failed to match on input "002".
393
394* Added new command-line options:
395  -u, --unbuffered
396    Do not attempt to read-ahead more than required; do not buffer stdout.
397  -l N, --line-length=N
398    Specify the desired line-wrap length for the `l' command.
399    A length of "0" means "never wrap".
400
401* New internationalization translations added: fr ru de it el sk pt_BR sv
402(plus nl from 3.02a).
403
404* The s/// command now understands the following escapes
405(in both halves):
406	\a	an "alert" (BEL)
407	\f	a form-feed
408	\n	a newline
409	\r	a carriage-return
410	\t	a horizontal tab
411	\v	a vertical tab
412	\oNNN	a character with the octal value NNN
413	\dNNN	a character with the decimal value NNN
414	\xNN	a character with the hexadecimal value NN
415This behavior is disabled if POSIXLY_CORRECT is set, at least for the
416time being (until I can be convinced that this behavior does not violate
417the POSIX standard).  (Incidentally, \b (backspace) was omitted because
418of the conflict with the existing "word boundary" meaning. \ooo octal
419format was omitted because of the conflict with backreference syntax.)
420
421* If POSIXLY_CORRECT is set, the empty RE // now is the null match
422instead of "repeat the last REmatch".  As far as I can tell
423this behavior is mandated by POSIX, but it would break too many
424legacy sed scripts to blithely change GNU sed's default behavior.
425
426----------------------------------------------------------------------------
427Sed 3.02a
428
429* Added internationalization support, and an initial (already out of date)
430set of Dutch message translations (both provided by Erick Branderhorst).
431
432* Added support for scripts like:
433 sed -e 1ifoo -e '$abar'
434(note no need for \ <newline> after a, i, and c commands).
435Also, conditionally (on NO_INPUT_INDENT) added
436experimental support for skipping leading whitespace on
437each {a,i,c} input line.
438
439* Added addressing of the form:
440 /foo/,+5 p (print from foo to 5th line following)
441 /foo/,~5 p (print from foo to next line whose line number is a multiple of 5)
442The first address of these can be any of the previously existing
443addressing types; the +N and ~N forms are only allowed as the
444second address of a range.
445
446* Added support for pseudo-address "0" as the first address in an
447address-range, simplifying scripts which happen to match the end
448address on the first line of input.  For example, a script
449which deletes all lines from the beginning of the file to the
450first line which contains "foo" is now simply "sed 0,/foo/d",
451whereas before one had to go through contortions to deal with
452the possibility that "foo" might appear on the first line of
453the input.
454
455* Made NUL characters in regexps work "correctly" --- i.e., a NUL
456in a RE matches a NUL; it does not prematurely terminate the RE.
457(This only works in -f scripts, as the POSIX.1 exec*() interface
458only passes NUL-terminated strings, and so sed will only be able
459to see up to the first NUL in any -e scriptlet.)
460
461* Wherever a `;' is accepted as a command terminator, also allow a `}'
462or a `#' to appear.  (This allows for less cluttered-looking scripts.)
463
464* Lots of internal changes that are only relevant to source junkies
465and development testing.  Some of which might cause imperceptible
466performance improvements.
467
468----------------------------------------------------------------------------
469Sed 3.02
470
471* Fixed a bug in the parsing of character classes (e.g., /[[:space:]]/).
472Corrected an omission in djgpp/Makefile.am and an improper dependency
473in testsuite/Makefile.am.
474
475----------------------------------------------------------------------------
476Sed 3.01
477
478* This version of sed mainly contains bug fixes and portability
479enhancements, plus performance enhancements related to sed's handling
480of input files.  Due to excess performance penalties, I have reverted
481(relative to 3.00) to using regex.c instead of the rx package for
482regular expression handling, at the expense of losing true POSIX.2
483BRE compatibility.  However, performance related to regular expression
484handling *still* needs a fair bit of work.
485
486* One new feature has been added: regular expressions may be followed
487with an "I" directive ("i" was taken [the "i"nsert command]) to
488indicate that the regexp should be matched in a case-insensitive
489manner.  Also of note are a new organization to the source code,
490new documentation, and a new maintainer.
491
492----------------------------------------------------------------------------
493Sed 3.0
494
495* This version of sed passes the new test-suite donated by
496Jason Molenda.
497
498* Overall performance has been improved in the following sense: Sed 3.0
499is often slightly slower than sed 2.05.  On a few scripts, though, sed
5002.05 was so slow as to be nearly useless or to use up unreasonable
501amounts of memory.  These problems have been fixed and in such cases,
502sed 3.0 should have acceptable performance.
503