>I am thinking about writing a postproc, using Ken Hornstein's example as a >template (though I will probably use Java rather than bash). It will invoke >whom and examine its output. I can find no documentation about whom's >non-error output format. Here is my conjecture about it.
As an aside: now that I look at the code, I realize that post (which really does the work for whom(1)), opens /dev/null and writes the headers to it. Boy, once you know how the sausage is made ... >Each output line (I don't particularly care how lines are delimited) is >exactly one of: > > A string beginning with zero or more white space characters followed by a > '-' > > A string containing exactly one address as a substring. > >Is this conjecture true? If so, can I count on it remaining true? You can also have an address followed by [BCC]. Also, the address (for dumb historical reasons) is printed as "user at domain". You can also in theory have a UUCP address (host!user) but you would have to work to make that happen, and I don't think you'd actually be able to send it anywhere if you did. You can also have a "local" address which has no @ or at. I don't think we can make any guarantees on the format of that output; for example, it might change to being simply user@domain. Also, getting rid of the distinction between local and network users might make sense, but that would require some more thought. I would simply display the output to the user and check the exit value. --Ken _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
