Subject: Re: ps -o field=HEADING,field2=HEADING2
To: None <tech-userlevel@NetBSD.org>
From: None <tlaronde@polynum.com>
List: tech-userlevel
Date: 09/12/2006 00:12:01
On Mon, Sep 11, 2006 at 11:52:20PM +0200, Alan Barrett wrote:
> 
> 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".

Yes, that's what I meant too: there is one argument to the -o option,
so if there is a '=' in it the remaining of the argument is the
replacement text (whether there is a comma, another '=' etc.). I.e. this
is exactly your interpretation.

> 
> 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?

No SUSv3 is the same.
-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
                 http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C