#ident	"@(#)bnu.admin:validnetaddr	1.3.2.1"
################################################################################
#	Module Name: validnetaddr.sh
#	
#	Inputs:
#		$1 - network address name
#	
#	Description: Verify a valid network address name was entered.
#
#                    Note that the input is concatenated to "hh" and then
#                    the expression is evaluated with expr. Certain characters
#                    such as - and * have special meaning if they occur as lone
#                    strings to expr.
#                   
###############################################################################
NEWARG="hh"$1
# does $1 begin with -?
if [ `expr $NEWARG : 'hh-'` -eq 3 ]
then
	exit 1
fi
echo $NEWARG
if [ `expr $NEWARG : '[0-9A-Za-z\.]*'` -eq `expr $NEWARG : '.*'` ]
then
        exit 0
else
        exit 1
fi

