An example looping script
The file below is an example file which demonstrates some of the testing as talked above along with several looping and control statements.
# Use the bash shell to run the script
# This is an example file to take entries from the user
# entries Version 1.0 May 22, 2000
ENTRIES="hello bye ls 1"
while [ $DONE = no ]
echo Valid entries are: $ENTRIES
read ENTRY # Read the variable ENTRY from the user
case $ENTRY in
echo How are you?
ls -al |more
echo $ENTRY is an unrecognized command.