Try this menu script for bash scripts:
while getopts ":u:a:s:v" options; do
case $options in
u ) uname=$OPTARG;;
a ) attrs=$OPTARG;;
s ) searchattr=$OPTARG;;
v ) att=ALL;;
h ) echo $USAGE;;
\? ) echo $USAGE
exit 1;;
* ) echo $USAGE
exit 1;;
esac
done
echo uname = $uname