export DISPLAY script help.

From: Joe Crawford (abjcrawford@yahoo.com)
Date: Tue Oct 22 2002 - 16:43:24 EDT


Team:

Please find attached the script where i am trying to
validate first number should be 155 and if true then
checks :0.0 and checks for a 2 digit value and sets
the DISPLAY variable. Now this only works for two
digit upto :99.0 but i need this to be working even
for a four digit display like from :1.0 thru :1000.0.
Please help me with this script.

# Verify the DISPLAY that user enters
verify_DISPLAY()
{
if [ "${1#155}" = "${1}" ]
then
# DISPLAY is NOT valid
echo "DISPLAY is NOT valid"
return 0
else
if [ "${1%:0.0}" = "${1}" ] && [ "${1%:[0-9][0-9].0}"
= "
${1}" ]
then
# DISPLAY is NOT valid
echo "DISPLAY is NOT valid"
return 0
fi
fi

return 1
}

Thanks
Joe.
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:09 EDT