Red Hat Bugzilla – Bug 437415
Fedora 8 distribution package of sed editor not working.
Last modified: 2015-05-04 21:33:44 EDT
Description of problem: After performing an upgrade from Fedora 7 to Fedora 8
I noticed that sed no longer likes to delete blank lines from a file using the
standard command (sed '/^$/d' filename).
Version-Release number of selected component (if applicable):
Source RPM: sed-4.1.5-9.fc8.src.rpm
Attempt to use sed to remove blank lines from a file.
Steps to Reproduce:
1.Create a simple file with several lines of alternating text and blank lines.
2.Use standard sed commands to remove the blank lines from the file.
3.ie - sed -e '/^$/d' filename > outfile - or - sed '/^$/d' filename - or -
sed '/./d' filename.
All blank lines which were originally blank in the file were still present
after command execution.
All blank lines should have been removed from the file.
I also ran sed with the 'l' option for debugging and it returned blank lines
as well as the carriage return characters '\$r' which were expected.
These sed commands work fine on my Fedora 7 distribution.
Works for me:
$ rpm -q sed
$ echo -ne 'hallo\n\n\nworld\n' | sed '/^$/d'
Please check that "rpm -V sed" doesn't complain and also please check that there
were no AVC (SELinux) denials during the upgrade.
In any case try to reinstall the sed package, and check that the problem persists.
Thank you for your feedback. Your SELinux AVC denial suggestion was valid.
Upgrading from Fedora 7 to Fedora 8 replaces the sshd_config file. I use a
sed script verify sshd variable settings by grepping non-commented lines and
then stripping out the blank lines from the output file using sed.
Turns out the problem is specific to the sshd_config file not a test file. My
apologies for not testing that option prior to placing the bugzilla.
Now if I only knew why other sed edits work on the new sshd_config file and
not the deletion of blank lines I would be all sed. (pardon the pun)