From owner-freebsd-questions Fri Jan 5 7:47:29 2001 From owner-freebsd-questions@FreeBSD.ORG Fri Jan 5 07:47:27 2001 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 6BECF37B400 for ; Fri, 5 Jan 2001 07:47:27 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.1/8.11.1) id f05FlLG11599; Fri, 5 Jan 2001 09:47:21 -0600 (CST) (envelope-from dan) Date: Fri, 5 Jan 2001 09:47:21 -0600 From: Dan Nelson To: Eric_Stanfield@kenokozie.com Cc: Jan Grant , freebsd-questions@FreeBSD.ORG Subject: Re: ps command Message-ID: <20010105094720.A5994@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.13i In-Reply-To: ; from "Eric_Stanfield@kenokozie.com" on Fri Jan 5 08:33:29 GMT 2001 X-OS: FreeBSD 5.0-CURRENT Sender: dan@dan.emsphone.com Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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