Subject: Re: ps(1) sysv silliness
To: None <greywolf@starwolf.com>
From: Simon Burge <simonb@netbsd.org>
List: tech-userlevel
Date: 06/08/2000 11:43:43
Greywolf wrote:

> BSD-style args have typically been keys (as long as I have used ps,
> i.e. "ps ax") while SysV has used option args (i.e. "ps -ef").
> I know this is probably an abominable concept ("EWWW LINUX!"), but
> I always found it kinda cool for ps to divine what the user
> wanted -- this was a nice example of DWIM code.

On our Sun's here, we have:

	mq:~ 869> which ps
	/usr/local/bin/ps
	mq:~ 870> cat `which ps`
	#!/bin/sh

	case $1 in
		-*)
			exec /usr/bin/ps $*
		;;
		*)
			exec /usr/ucb/ps $*
		;;
	esac

:-)

> Why not do that?  I never type "ps -ax" or "ps ef" :-)
> 
> #  a) So pukable that noone in their right mind would ever use it?
> 
> If it must be done this way, I suppose -- see above.

Note that I only did this because a friend said "I'm used to typing
ps -fu <user>" and this is a proof of concept.  I'm not suggesting
that this be integrated into NetBSD unless enough people feel that
it would be useful in some guise or another...

Simon.