in a 'g//' search, ed does not execute chained commands after 'a', 'i', 'c'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ed (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: ed
When chaining multiple commands with a g// search, ed in Ubuntu stops at the first 'a', 'i', or 'c' and does not execute any commands after it. It does not even examine them for syntax errors. ed in Mac OS X Leopard executes as expected, see the example below.
Note that in the second command, ed in OS X performs the command on one matched line before stopping due to the syntax error. This is probably not expected either, ed should not do anything if there is a syntax error. But this behaviour is better than not reporting the error at all and silently succeeding.
In Ubuntu:
$ ed
H
P
*a
foobar
foobaz
.
*g/foo/a\
spam\
.\
p
*# nothing printed here, contrast with OS X
*g/foo/a\
eggs\
.\
nonexistentcommand
*# no error printed here
*1,$p
foobar
eggs
spam
foobaz
eggs
spam
*# command done instead of stopping due to syntax error
In Mac OS X Leopard:
$ ed
H
P
*a
foobar
foobaz
.
*g/foo/a\
spam\
.\
p
spam
spam
*g/foo/a\
eggs\
.\
nonexistentcommand
?
invalid command suffix
*1,$p
foobar
eggs
spam
foobaz
spam
*
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: ed 1.4-1build1
ProcVersionSign
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Tue Jun 29 09:19:34 2010
ExecutablePath: /bin/ed
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: ed
fixed in 1.5-1 in debian/experimental