fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Finally got around to writing a new blog post, this time on Unix manual pages. Turns out the history is complicated enough, that the actual man command will have to wait until the second part!

abochannek.github.io/utilities

Shout-out to everybody who went through the SunOS to Solaris transition, too. The shuffling of sections 4, 5, and 7 in SysV still annoys me thirty years later.

(Reposting with public visibility)

Alex’s Blog · Man Pages (Part 1)Contents Introduction Text Processing Origins Manual Page Format Manual Sections Sub-Sections System V Sections Reordering Higher-Number Sections

@awb the SysV shuffling annoyed me as well when packaging FOSS for Solaris and we'd have to shuffle their man pages to fit, and when I had to implement support for it during the conversion of X11R7 from Imake to automake. So when I became tech lead for Solaris 12 (later renamed 11.4) I decided we'd undo it:
blogs.oracle.com/solaris/post/

@alanc Thank you for the clarification, I will update the blog post with that information soon!

I don't recall if I have actually used Solaris 11. The bulk of my hands-on Sun work was in the 1990s, so roughly SunOS 3.5 to Solaris 7 with a lot of systems on 4.1.x for many years (Solaris before 2.3 was a bit of a risky proposition.)

What happened to the SGML man-pages that were introduced in Solaris 7 and all that AnswerBook stuff? Is that still around in 11.4?

Alan Coopersmith

@awb the man page sources are in XML now, using a customized DocBook DTD, much like the DTD used with SGML, from which we generate nroff, html, & PDF output, but only the nroff output is shipped with the OS now. We do the XML->nroff conversion once at build time, instead of every time a user runs the man command as was done in the SGML days.

Answerbook is gone now, replaced by a web browser and docs.oracle.com/en/operating-s (and docs.sun.com before that).

Oracle Help Center · Oracle Solaris 11.4 Documentation Library - Oracle Solaris 11.4 Documentation Library

@alanc Right, man(1) in Solaris 7 could process nroff and SGML sources, IIRC.

I take it none of those XML pages or the toolchain are available externally? Are you doing anything with existing nroff or mandoc-formatted pages for external tools you ship?

@awb right - the original plan was to create a curses gui more like GNU info than "nroff | more" for display of the SGML man pages allowing for following links & other advanced features, but it was never completed. All that ever shipped was a pipeline to convert SGML to nroff to view the pages the traditional way when you ran the man command.

The SGML support was removed from the man command in Solaris 11.4 after we finished the SGML to XML conversion for all the man page sources.

@awb the XML pages aren't available externally - the script to generate nroff from XML is actually shipped in Solaris 11.4 as /usr/share/xml/xsolbook/python/xml2roff.py - it's a wrapper around the open source xsltproc command.

We also have a tool that does a crude conversion of external man pages into a <pre> wrapped version so they can be published online - you can see the difference between our native grep & GNU grep man pages:
docs.oracle.com/cd/E88353_01/h
docs.oracle.com/cd/E88353_01/h

docs.oracle.comgrep - man pages section 1: User Commandsgrep - search a file for a pattern The grep utility searches text files for a pattern and prints all lines that contain that pattern. It uses a compact non-deterministic...