Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Kyle McDonald
Alan Coopersmith wrote: > Kyle McDonald wrote: > >> But since /usr/ucb/ps currently takes 'aux' or '-aux' (for example) then >> if invoked as /usr/ucb/ps, or found through PATH=/usr/ucb:..., then I >> think it's correct to continue the /usr/ucb behavior. >> > > This could be as simple as

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Alan Coopersmith
Kyle McDonald wrote: > But since /usr/ucb/ps currently takes 'aux' or '-aux' (for example) then > if invoked as /usr/ucb/ps, or found through PATH=/usr/ucb:..., then I > think it's correct to continue the /usr/ucb behavior. This could be as simple as borrowing the PS_PERSONALITY variable from GN

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>> Currently Solaris has two distinct versions of ps; to use one or the other >> you need to either give the full path or change $PATH. >> >> And that while a little bit of code could tell most invocations apart. >> >> Because it has been bothering me I'd like to fix this and so I'd like to >> ask

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Peter Tribble
On Fri, Feb 15, 2008 at 7:40 PM, Kyle McDonald <[EMAIL PROTECTED]> wrote: > Peter Tribble wrote: > > On Fri, Feb 15, 2008 at 7:33 PM, Kyle McDonald <[EMAIL PROTECTED]> wrote: > > > >> But since /usr/ucb/ps currently takes 'aux' or '-aux' (for example) then > >> if invoked as /usr/ucb/ps, or f

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread David . Comay
> Currently Solaris has two distinct versions of ps; to use one or the other > you need to either give the full path or change $PATH. > > And that while a little bit of code could tell most invocations apart. > > Because it has been bothering me I'd like to fix this and so I'd like to > ask some ad

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>On Fri, Feb 15, 2008 at 7:30 PM, <[EMAIL PROTECTED]> wrote: >> >> But if you type /usr/ucb/ps or /usr/bin/ps, what do you expect? >> >> Or PATH=/usr/ucb:$PATH ps >> vs >>PATH=/usr/bin:$PATH ps > >If arguments start with a -, be /usr/bin/ps; otherwise be >/usr/ucb/ps, in all cases.

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Kyle McDonald
Peter Tribble wrote: > On Fri, Feb 15, 2008 at 7:33 PM, Kyle McDonald <[EMAIL PROTECTED]> wrote: > >> But since /usr/ucb/ps currently takes 'aux' or '-aux' (for example) then >> if invoked as /usr/ucb/ps, or found through PATH=/usr/ucb:..., then I >> think it's correct to continue the /usr/uc

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Peter Tribble
On Fri, Feb 15, 2008 at 7:30 PM, <[EMAIL PROTECTED]> wrote: > > But if you type /usr/ucb/ps or /usr/bin/ps, what do you expect? > > Or PATH=/usr/ucb:$PATH ps > vs >PATH=/usr/bin:$PATH ps If arguments start with a -, be /usr/bin/ps; otherwise be /usr/ucb/ps, in all cases. (This is h

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Peter Tribble
On Fri, Feb 15, 2008 at 7:33 PM, Kyle McDonald <[EMAIL PROTECTED]> wrote: > > But since /usr/ucb/ps currently takes 'aux' or '-aux' (for example) then > if invoked as /usr/ucb/ps, or found through PATH=/usr/ucb:..., then I > think it's correct to continue the /usr/ucb behavior. Well, I'm one of

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Kyle McDonald
Joerg Schilling wrote: > "Peter Tribble" <[EMAIL PROTECTED]> wrote: > > >>> The simple plan is this: >>> >>> - if called with an argument which does not start with "-", >>> be /usr/ucb/ps >>> - if called with an argument starting with "-" behave like ucb ps >>>

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>On Fri, Feb 15, 2008 at 6:58 PM, Kyle McDonald <[EMAIL PROTECTED]> wrote: > >> > >> I'm not sure, but I read this as: >> >> if argv[0]="/usr/ucb/ps" then interpret the args the ucb way even if >> there is a -. >> >> That doesn't sound bad to me. If people put that in their path that's >> pr

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
> >> From [EMAIL PROTECTED] Fri Feb 15 11:05:28 2008 >> > >> >The other question would be - which output do you get with no >> >arguments at all? >> >> The same as currently, depending on $PATH. I'm not sure what other >> compatible options there are. > >Are you parsing $PATH when argv[0]=="ps"

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Joerg Schilling
"Peter Tribble" <[EMAIL PROTECTED]> wrote: > > The simple plan is this: > > > > - if called with an argument which does not start with "-", > > be /usr/ucb/ps > > - if called with an argument starting with "-" behave like ucb ps > > or bin/ps depending on how t

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Peter Tribble
On Fri, Feb 15, 2008 at 6:58 PM, Kyle McDonald <[EMAIL PROTECTED]> wrote: > > > I'm not sure, but I read this as: > > if argv[0]="/usr/ucb/ps" then interpret the args the ucb way even if > there is a -. > > That doesn't sound bad to me. If people put that in their path that's > probably what

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread John Zolnowsky x69422/408-404-5064
> From [EMAIL PROTECTED] Fri Feb 15 11:05:28 2008 > > > >The other question would be - which output do you get with no > >arguments at all? > > The same as currently, depending on $PATH. I'm not sure what other > compatible options there are. Are you parsing $PATH when argv[0]=="ps"?

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>I'm not sure, but I read this as: > >if argv[0]="/usr/ucb/ps" then interpret the args the ucb way even if >there is a -. Correct. >That doesn't sound bad to me. If people put that in their path that's >probably what they expect. That was my thinking too. Casper ___

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
>On Fri, Feb 15, 2008 at 1:55 PM, <[EMAIL PROTECTED]> wrote: >> >> >> Currently Solaris has two distinct versions of ps; to use one or the other >> you need to either give the full path or change $PATH. >> >> And that while a little bit of code could tell most invocations apart. >> >> Because

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Kyle McDonald
Peter Tribble wrote: > On Fri, Feb 15, 2008 at 1:55 PM, <[EMAIL PROTECTED]> wrote: > >> Currently Solaris has two distinct versions of ps; to use one or the other >> you need to either give the full path or change $PATH. >> >> And that while a little bit of code could tell most invocations a

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Peter Tribble
On Fri, Feb 15, 2008 at 1:55 PM, <[EMAIL PROTECTED]> wrote: > > > Currently Solaris has two distinct versions of ps; to use one or the other > you need to either give the full path or change $PATH. > > And that while a little bit of code could tell most invocations apart. > > Because it has be

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Shawn Walker
On Fri, Feb 15, 2008 at 8:31 AM, <[EMAIL PROTECTED]> wrote: > "Way overboard", I'd say. Sorry, I should have been clearer. > Or is there really much interest in all other output flavors? I was only listing it as a point of comparison to show how another variant of ps handled syntax compatibil

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
> ENVIRONMENT VARIABLES > The following environment variables could affect ps: > > COLUMNS Override default display width > LINESOverride default display height > PS_PERSONALITY Set to one of posix,old,linux,bsd,sun,digital > CMD_

Re: [osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Shawn Walker
On Fri, Feb 15, 2008 at 7:55 AM, <[EMAIL PROTECTED]> wrote: > > > Currently Solaris has two distinct versions of ps; to use one or the other > you need to either give the full path or change $PATH. > > And that while a little bit of code could tell most invocations apart. > > Because it has be

[osol-code] Merging /usr/ucb/ps & /usr/bin/ps

2008-02-15 Thread Casper . Dik
Currently Solaris has two distinct versions of ps; to use one or the other you need to either give the full path or change $PATH. And that while a little bit of code could tell most invocations apart. Because it has been bothering me I'd like to fix this and so I'd like to ask some advice. Mer