'sed -e' dumps core
Paul Eggert
eggert at sm.unisys.com
Tue Sep 6 03:42:08 AEST 1988
Richard A. O'Keefe writes that "sed -e" dumps core in older SunOS releases, but
not on SunOS 4.0RRBeta2 on a 386i. This prompts me to dig out the following
bug report for SunOS 4.0 on a Sun-3/60 (Sun bug ID 1012595):
sed: "-e '' file" and "-f /dev/null file" treat the file name as a command
When sed is given an empty script with the -e or -f flag, it gets
confused and tries to grab the next argument as a command.
The following script illustrates the problem. All three commands
should do nothing, but only the first one works correctly.
% sed '' /dev/null
% sed -e '' /dev/null
sed: Extra text at end of command: /dev/null
% sed -f /dev/null /dev/null
sed: Extra text at end of command: /dev/null
This new bug does not exist under SunOS 3.5 on the same machine; 3.5 exhibited
the old core dumping bug. So if you're fixing the "'sed -e' dumps core" bug,
please check that you do not introduce this new bug, like Sun did.
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list