Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wanted to use ed for something recently and was punched with:

  bash: ed: command not found
Apparently, despite being mandated by POSIX, not every Linux distro (e.g. Arch) ship it by default


Found this surprising having used arch for years. Turns out ed is not in GNU coreutils, which is part of the base package. But there's a posix package which includes ed and other posix stuff.


It is very frustrating. In my personal sh library, I probe for `ed` and, if not available, I alias to `ex -s`; I then write in-place editing scripts carefully to use only common functionality to both. Sigh.


Yeah... to my even bigger surprise, ex also was nowhere to be found!


That is very strange; ex should be part of Arch base... oh well, probe for `vi -s` and if this does not work either, get karma on reddit or whatever by making fun of Arch :D


Now that I look at it, base package is missing [0] a bit of stuff:

> The base package does not include all tools from the live installation, so installing other packages may be necessary for a fully functional base system. In particular, consider installing:

> - userspace utilities for the management of file systems that will be used on the system,

> - utilities for accessing RAID or LVM partitions,

> - specific firmware for other devices not included in linux-firmware (e.g. sof-firmware for sound cards),

> - software necessary for networking (e.g. a network manager or DHCP client),

> - a text editor,

> - packages for accessing documentation in man and info pages: man-db, man-pages and texinfo.

[0]: https://wiki.archlinux.org/title/Installation_guide#Install_...


one box I tried recently had the absurd and possibly sacrilegious;

   alias vim='emacs -nw'

   alias vi='vim'

   alias ed='vi'


Mein Gott, some people just want to see the world burn


Most Linux distros don't claim to be POSIX compliant. (In fact, software on GNU/Linux in general doesn't claim to be such. Sometimes it's taken as a guideline, more often ignored entirely.)


Which makes GNUs argument for deprecating egrep all the more frustrating.


Debian doesn't seem to install it by default either.




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

Search: