#!/bin/sh

clear

echo "------------------------------"
echo "Concert Ticket Cost Calculator"
echo "------------------------------"
echo -e "\n"
echo -n "Please enter your name. > "

#       gets user's name, says hi
read name
echo -e "\nHi $name!\n"

#       prints a list of categories and prices
echo "There are four categories of tickets available for purchase."
echo "They are divided according to age. They are:"
echo -e "\tChildren \t(under 12)\tfree\n\tJuniors \t(ages 13-20)\t\04420"
echo -e "\tAdults \t\t(ages 21-64)\t\04425\n\tSeniors \t(65 and older)\t\04420"

#       gets number of tickets per category
echo -e "\nHow many tickets would you like..."
echo -en "\tFor Children? > "
read ticChil
echo -en "\tFor Juniors?  > "
read ticJuni
echo -en "\tFor Adults?   > "
read ticAdul
echo -en "\tFor Seniors?  > "
read ticSeni

#       calculates totals
totJuni=`expr $ticJuni '*' 20`
totAdul=`expr $ticAdul '*' 25`
totSeni=`expr $ticSeni '*' 20`
totAll=`expr $totJuni + $totAdul + $totSeni`

#       prints out receipt
echo -n "Press ENTER to display your reciept."
read fdfasdf
clear
echo -e "\tReceipt for Concert Tickets"
echo -e "\t---------------------------\n"
echo -e "\tName:\t\t$name"
echo -e "\tDate/time:\t`date`\n"
echo -e "\tTotal for each category:\n"
echo -e "\t\tChildren: \t\0440"
echo -e "\t\tJuniors:  \t\044$totJuni"
echo -e "\t\tAdults:   \t\044$totAdul"
echo -e "\t\tSeniors:  \t\044$totSeni\n"
echo -e "\tGrand Total:\t\t\044$totAll"
echo -e "\n\n"