Hacker News new | past | comments | ask | show | jobs | submit login

The POSIX standard defines ed as one of the editors that must be present for a system to be standard complaint, the other being vi I believe. You can always expect ed to be available to you on a Unix system.




You can see all of the utilities this way. The ex editor is also standard.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/


TIL: busybox has ed and vi but not ex. https://www.busybox.net/downloads/BusyBox.html (so ex might be nice to learn but it might be not available on common systems like OpenWRT)


Technically, vi and ex are part of the User Portability Utilities extension.


This was initially why I learned enough of the vi keybinds to get by.

You can expect it to be there.


You can expect that on a unix system that has applied, paid and received the unix certification.

Most linux distros (and most BSDs afaik) are not unix certified.

MacOS is, for that matter.


POSIX != Unix (the certification)

It is true that all certified Unix systems follows POSIX, but it doesn't mean that non-certified systems are forbidden to follow POSIX. Most Linux distributions have ways to turn to 98% compliant, and BSDs have always strive to follow POSIX.

Weird fact: POSIX was actually named by RMS.


OpenBSD was fairly anti-POSIX in the past. I don't know if that's relaxed at all, but they very much do not chase after it.


But they do have ed, vi (plus ex), and mg (which is not standard but nice to have) in their base system.


Two of those programs predate POSIX and do not indicate that OpenBSD follows POSIX.

They are making their operating system to the design they like best. Some of it happens to coincide with what POSIX asks for, but it is merely coincidental.


I vaguely recall some interview with or blog post / talk by an OpenBSD developer, where they said that POSIX tended towards adopting whatever GNU/Linux did, and that the BSD crowd's interests were not taken into consideration that much.

I don't know much about the process behind POSIX/SUS, but I can understand how OpenBSD developers wouldn't be super enthusiastic about POSIX compliance if they felt their input was falling on deaf ears.

FWIW, I did use the SUS as my main reference when writing a few hobby projects, and OpenBSD gave me no problems whatsoever. macOS, on the other hand, which is a certified Unix, did not support barriers at the time (that was ~10 years ago, I have no idea if Apple added support since). (I know barriers are optional, but come on.)


Inspur K-UX is a Linux distribution that is officially a Unix.


OpenEuler, Huawei's version of RHEL, is also UNIX-certified.


I wonder what benefit the certification has these days. IIUC, it used to be a requirement for contracts from large corporations and government agencies, but these days the number of commercial Unix systems is fairly small, and RHEL is so common in those environments, I wonder if it there's still places where it's required.


They still have ed though, do they not?


Even DOS and VMS had ed, I'm sure other OSs too.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: