busybox ed jumps line on insert

Bug #1941981 reported by karlsebal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
New
Undecided
Unassigned

Bug Description

Busybox‘s implementation of `ed` skips a line when inserting. It will insert the first line before and all subsequent lines after the line addressed.

gnu ed implementation behaves like expected:

```
$ ed
i
one
two
three
four
five
.
,p
one
two
three
four
five
1
one
i
ione
itwo
ithree
ifive
.
,p
ione
itwo
ithree
ifive
one
two
three
four
five
Q
```

The lines »ione« through »ifive« are inserted before the line »one«. But busybox’s behaviour differs:

```
$ busybox ed
: i
one
two
three
four
five
.
: ,p
one
two
three
four
five
: 1
one
: i
ione
itwo
ithree
ifour
ifive
.
: ,p
ione
one
itwo
ithree
ifour
ifive
two
three
four
five
: q
Really quit? y
```

The line »ione« is inserted before »one« and the lines »itwo« through »ifive« are appended after »one«. However, `append` works as expected.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: busybox (not installed)
ProcVersionSignature: Ubuntu 5.4.0-81.91-generic 5.4.128
Uname: Linux 5.4.0-81-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.18
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: Regolith:GNOME-Flashback:GNOME
Date: Sun Aug 29 08:27:55 2021
InstallationDate: Installed on 2020-10-14 (318 days ago)
InstallationMedia: Regolith 20.04.0 1.4.1 LTS amd64 (20200511)
SourcePackage: busybox
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
karlsebal (karlsebal) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.