Elektrine lite

← Feed

@tux0r@layer8.space

Post #1767865

2026-04-26 23:21 UTC

@aartaka @ed1conf ed(1) is portable if you use one ed(1) implementation. GNU ed <> BSD ed <> POSIX ed.

Replies (2)

  • @aartaka@merveilles.town 2026-04-26 23:27

    @tux0r not necessarily. POSIX is implemented by many editors. My scripts, relying on POSIX behaviors, run under GNU ed, OpenBSD ed, and Mac ed. @ed1conf

    Open ##1767866

  • @ed1conf@bsd.network 2026-04-26 23:32

    @tux0r To be fair, there are some minor differences in implementations. Things like • the x command doing encryption in some versions (has been added-then-removed in some), • GNU ed no longer allowing the omission of trailing slashes in s commands like s/regex • GNU ed offering y to yank lines and x to put lines • GNU ed provides # for script comments, but that's rejected in the other versions I have available If you stick to POSIX, the only odd-one-out is the s/regex which GNU breaks (according to POSIX, "If the closing delimiter of an RE or of a replacement string (for example, '/' ) in a g, G, s, v, or V command would be the last character before a , that delimiter can be omitted" [emphasis mine]) @aartaka edit: markdown ate less-than-sign

    Open ##1767867