Aqui está uma maneira:
"Add users to group")
read -e -p "Enter the group name: " -i "www-pub" groupname
loop=true # "true" is a command
while $loop; do # the "$loop" command is executed
read -p "enter username: " username
if [[ -z $username ]]; then
loop=false # this command returns a fail status, and
# will break the while loop
else
# add user to group
fi
done
;;
Uma maneira mais concisa:
while true; do
read -p "enter username: " username
[[ -z $username ]] && break
# add user
done