Andrew L. Moore wrote:
Antonio Diaz Diaz <anto...@gnu.org> writes: ] How do you propose to implement such a warning while remaining ] POSIX-compliant?In github.com/slewsys/ed this is implemented by reporting 'Read-only' if ed is in verbose mode: $ ed -v /etc/os-release /etc/os-release: File is read-only 735
I find it less intrusive what is already implemented in GNU ed 1.20-pre3; warn only if trying to modify the buffer:
$ ed /etc/profile 2840 1d /etc/profile: warning: read-only file