#!/usr/bin/ksh
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# bos720 src/bos/usr/bin/svcmd/mach/mach.sh 1.3 
#  
# Licensed Materials - Property of IBM 
#  
# Restricted Materials of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2001,2007 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 


# @(#)62        1.3  src/bos/usr/bin/svcmd/mach/mach.sh, uw7cmds, bos720 3/22/07 10:10:22

# Portability: check for AIX dspmsg utility.
type /usr/bin/dspmsg >/dev/null
DM=$?

# Portability: Handle usage of dspmsg according to this code template
# so the code will work even if  dspmsg  is not defined:
# if [ $DM = 0 ] ; then
# dspmsg -s 1 sysvmach.cat <msg_id> <default message>
# else echo <<default message> WITHOUT final newline and WITH substitutions>
# fi

# Functionality:
#   Display the processor type of the current host 
#
# Exit Status:
#   =0	Successful completion. 
#   >0	An error occurred

if [ $# -gt 0 ]
then
	if [ $DM = 0 ] ; then
		/usr/bin/dspmsg -s 1 sysvmach.cat 1 "Usage: mach\n" 1>&2
	else 
		echo "Usage: mach" 1>&2
	fi
	exit 1
fi

# Invokes the uname command to print the processor type of the system.
/usr/bin/uname -p