Skip to content

Instantly share code, notes, and snippets.

@Hrozhek
Created May 21, 2016 11:52
Show Gist options
  • Select an option

  • Save Hrozhek/03d552c44e68a37e49395b693eed5157 to your computer and use it in GitHub Desktop.

Select an option

Save Hrozhek/03d552c44e68a37e49395b693eed5157 to your computer and use it in GitHub Desktop.
for stepic course
while [[ True ]]
do
echo 'enter your name:'
read name
if [[ -z $name ]]
then
echo 'bye'
break
else
echo 'enter your age:'
read age
case $age in
0)
echo 'bye'
break
;;
1-16)
echo '$name, , your group is child'
continue
;;
17-25)
echo '$name, , your group is youth'
continue
;;
26-10000000000)
echo '$name, , your group is adult'
continue
;;
esac
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment