Re: whatnow: problems with edit--draft left

Ralph Corderoy <[email protected]>
Newsgroups gmane.mail.nmh.devel
Message-ID <[email protected]>
Hi Andy,

> Man page for OpenBSD's ed:
>
> EXIT STATUS
>      The ed utility exits 0 on success, and >0 if an error occurs.

What am I doing wrong?  I don't see ‘success’ in
https://cvsweb.openbsd.org/src/bin/ed/ed.1?rev=1.77&content-type=text/x-cvsweb-markup

> Does this statement mean that there was an error during the sequence
> of ed commands or does it mean that there was an error in saving?

Without a tighter definition, we can't tell.

OpenBSD's ed, and NetBSD's which I had already looked at before your
email, lists some ‘OMISSIONS’ in
https://cvsweb.openbsd.org/src/bin/ed/POSIX?rev=1.8&content-type=text/x-cvsweb-markup

> So, in my case, ed exited 0.  Is this a bug in OpenBSD's ed which
> claims to be "compliant with the IEEE Std 1003.1-2008 ("POSIX.1")
> specification", or a bug in the man page?

I'd say OpenBSD's ed.  ed(1p) here says

    It shall be an error if a search for a BRE fails to find a matching
    line.

and

    Some historical implementations returned exit status zero even if
    command errors had occurred; this is not allowed by this volume of
    POSIX.1‐2008.

-- 
Cheers, Ralph.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.