#
# usage:        whichps.sh
#
# abstract:     This Bourne Shell script determines the type of 'ps'
#		command. It sets the variable psCmdSysV.
#
#		psCmdSysV - Which 'ps' command?
#			    "FALSE" - BSD version
#			    "TRUE"  - System V version
#
# note(s):	1. This routine must be called using a . (period)
#		2. It ASSUMES that the variable 'Arch' exists and is
#		   set.
#
# Copyright (c) 1993 by The MathWorks, Inc.
# $Revision: 1.5 $  $Date: 1993/07/29 21:46:52 $
#----------------------------------------------------------------------------
#
    psCmdSysV="FALSE"
    case $Arch in
	sun4)
	    ;;
	sol2)
	    psVpath=`echo $PATH | tr ":" " "`
            for dirname in $psVpath
            do
		found=0
           	if [ -d $dirname/ps ]; then
		    found=1
           	else
              	    lscmd=`ls -l $dirname/ps 2>/dev/null`
              	    if [ "$lscmd" ]; then
                 	found=1
              	    fi
            	fi
		if [ "$found" = "1" ]; then
		    if [ $dirname = "/usr/ucb" ]; then
			break
		    elif [ $dirname = "/bin" -o $dirname = "/usr/bin" ]; then
			psCmdSysV="TRUE"
			break
		    fi
		fi
	    done
	    ;;
	hp300)
    	    psCmdSysV="TRUE"
	    ;;
	hp700)
    	    psCmdSysV="TRUE"
	    ;;
	sgi)
    	    psCmdSysV="TRUE"
	    ;;
	dec_risc)
	    ;;
	ibm_rs)
    	    psCmdSysV="TRUE"
	    ;;
	alpha)
	    ;;
	apollo)
	    ;;
	*)
	    ;;
    esac
