[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-ed] Posix non-compliance in chained commas

From: Matthieu Felix
Subject: [Bug-ed] Posix non-compliance in chained commas
Date: Sun, 25 Mar 2018 21:56:05 -0400


I’ve run into some behavior that I think does not conform to the Posix spec.

The command `,,p` prints the entire buffer in GNU ed (1.14.2). However, one of 
the last sections of the Posix page on ed ( 
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ed.html ) explicitly 
notes that `,,` is the range `$,$`, not `1,$`. BSD ed on OSX follows the Posix 
spec and prints the last line only.

It’s not completely clear to me why this is the recommended behavior, though. I 
think it depends whether you fill in the missing addresses from left to right 
or right to left, which is not discussed anywhere in the spec.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]