Repository navigation
sed: show an empty pattern space as $ in l, even without a newline - #595
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #595 +/- ##
==========================================
+ Coverage 94.82% 94.84% +0.01%
==========================================
Files 14 14
Lines 7212 7210 -2
Branches 428 427 -1
==========================================
- Hits 6839 6838 -1
+ Misses 372 371 -1
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
DePasqualeOrg
force-pushed
the
fix-l-empty-line
branch
from
October 4, 2026 10:19
117b8c3 to
5757f78
Compare
DePasqualeOrg
marked this pull request as ready for review
October 4, 2026 10:30
Contributor
|
Thanks for your PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the pattern space is empty and its input line had no final newline,
lprints nothing, while GNU sed prints$. For example,printf a | sed -n 's/a//;l'prints nothing instead of$. This PR prints$and a newline for an empty pattern space in every case.