Subject: Re: ps -o field=HEADING,field2=HEADING2
To: None <tech-userlevel@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 09/11/2006 23:52:20
On Mon, 11 Sep 2006, tlaronde@polynum.com wrote:
> FWIW, here is the v3 phrasing :
> 
> ----quote
> The -o option allows the output format to be specified under user
> control.
> 
> The application shall ensure that the format specification is a list of
> names presented as a single argument, <blank> or comma-separated. [...]

The text in SUSv2 is almost identical.  See
http://www.opengroup.org/onlinepubs/007908799/xcu/ps.html.

That stuff about a single argument doesn't mean "don't use multiple
-o options"; it means "each instance of the -o option has only one
argument".  It's not saying "don't use {ps -o pid -o ppid}"; it's saying
"the "ppid" in {ps -o "pid" "ppid"} is not part of the -o option".

SUSv2 has an "APPLICATION USAGE" section that includes the text 

    There is no special quoting mechanism for header text.  The
    header text is the rest of the argument.  If multiple header
    changes are needed, multiple -o options can be used, such as:

    ps -o "user=User Name" -o pid=Process\ ID

Is this missing from SUSv3?

--apb (Alan Barrett)