Public bug reported:

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
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: fglrx
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

** Affects: ed (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug lucid

-- 
in a 'g//' search, ed does not execute chained commands after 'a', 'i', 'c'
https://bugs.launchpad.net/bugs/599652
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to