Date: Fri, 05 Jan 2001 11:52:15 +0000 From: Mikel King <mikel@ocsinternet.com> To: Dan Nelson <dnelson@emsphone.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ps command Message-ID: <3A55B56F.EF9666E9@ocsinternet.com> References: <OF19F4D5DB.348DBEC2-ON862569CB.004FC271@kka.com> <20010105094720.A5994@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Dan Nelson wrote: > In the last episode (Jan 05), Eric_Stanfield@kenokozie.com said: > > Yeah I'd certainly be interested in the functionality. It's a pain > > in the ass moving between solaris and bsd boxes and, without fail, > > feeding ps the wrong syntax for its switches. Of course the easy > > solution on machines I have directo control over is just to alias the > > cmd to reflect its usage on the opposite OS. > > A great workaround for Solaris boxes is to put this shell script in > /usr/local/bin: > > #! /bin/sh > case $1 in > -* ) exec /usr/bin/ps "$@" ;; > * ) exec /usr/ucb/ps "$@" ;; > esac > > If you run it with dash arguments, you get sysV ps, otherwise you get > BSD ps. > > -- > Dan Nelson > dnelson@emsphone.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message I use a truely lazy one as follows. #!/bin/sh # Last Serial No. 1999111501 # MK # if [ -z $1]; then ps ax | more else ps ax |grep $1 fi I named the script ax after the two switches I use the most... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A55B56F.EF9666E9>