#
#####Message Texts######
set mesg1 = "Please enter the name of the host address to be updated: "
set mesg2a = "Host name "
set mesg2b = " not found, please check and try again."
set mesg3 = "Please enter new numeric Internet address(default is old address):"
set mesg4a = "Address number "
set mesg4b = " is already taken, please select another."
set mesg5 = "Please enter new host name (default is old host name): "
set mesg6 = "Please enter additional aliases (default is current ones):"
########################
						# get specific host name 
echo -n $mesg1' '
scanname:
set name = ($<)
if ($#name == 0) then
	goto scanname
endif
						# make sure this entry exists
fgrep -s $name /etc/hosts
if ($status == 1) then
	echo -n $mesg2a $name $mesg2b' '
	goto scanname
endif
						# get unique new address
echo -n $mesg3' '
scan_adrs:
set adrs = ($<)
if ($#adrs == 0) then
	goto get_host 
endif
						# check new adrs for uniqueness
fgrep -s $adrs /etc/hosts
if ($status != 1) then
	echo -n $mesg4a $adrs $mesg4b' '
	goto scan_adrs
endif

get_host:					# get new host name
echo -n $mesg5' '
set hid = ($<)
