Если выбран вариант quit (завершение), вы удаляете временный файл, выводите сообщение и завершаете сценарий с успешным кодом завершения.
rm -f $temp_file
if [ ! -f $title_file ]; then
touch $title_file
fi
if [ ! -f $tracks_file ]; then
touch $tracks_file
fi
# Теперь непосредственно приложение
clear
echo
echo
echo "Mini CD manager" sleep 1
quit=n
while [ "$quit" != "y" ]; do
set_menu_choice
case "$menu_choice" in
a) add_records;;
r) remove records;;
f) find_cd y;;
u) update_cd;;
c) count_cds;;
l) list_tracks;;
b)
echo
more $title_file
echo
get return;;
q | Q ) quit=y;;
*) echo "Sorry, choice not recognized";;