Project

General

Profile

Bug #13051

sed: lastline check does not work properly with empty files

Added by Andy Fiddaman 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Sed has a bug where it does not treat a line as a 'last line' candidate if there are more files to process.

e.g.

% sed -n '$p' /etc/passwd
php:x:82:82:PHP User:/var/opt/ooce/php:

% sed -n '$p' /etc/passwd /dev/null
%

Related issues

Related to illumos gate - Feature #13061: Import sed tests from freebsdClosedAndy Fiddaman

Actions

Also available in: Atom PDF