[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ed] Invalid command "ppp" accepted without error
From: |
Antonio Diaz Diaz |
Subject: |
Re: [Bug-ed] Invalid command "ppp" accepted without error |
Date: |
Sat, 27 Feb 2016 17:42:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.1.4) Gecko/20070601 SeaMonkey/1.1.2 |
Ori Avtalion wrote:
Tested with latest CVS.
What CVS? Latest code is 1.13.
The command "ppp" is invalid, but interpreted by ed as "p".
POSIX allows only one "p" suffix to follow, so "pp" is valid.
I am not sure if this is a bug or a feature. Ed allows any number of
suffixes and combines their effects:
$ ed ed-1.13/README
5849
p
itself.
pn
146 itself.
pl
itself.$
pln
146 itself.$
Maybe this should be documented as an extension to/deviation from POSIX.
I found the following in the RATIONALE section of the POSIX ed manual[1]:
"The use of printing commands with printing suffixes (such as pn, lp,
and so on) was made unspecified because BSD-based systems allow this,
whereas System V does not."
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ed.html
Best regards,
Antonio.