#!/bin/bash
#Example of menu programs
while true;
do
echo "*******************"
echo "1.Date"
echo "2.List of users"
echo "3.Open a file"
echo "4.delete a file"
echo "5.Exit"
echo "*******************"
echo "Enter a choice[1-5] :"
read choice
case $choice in
1) echo "Today date is : 'date'";;
2) who ;;
3) 'touch file';;
4) 'rm -rf kk';;
5) break ;;
*) echo "Wrong choice. Please try again";;
esac
done
Para sua referência: Unix - Shell Loop Control