All pastes #986022 Raw Edit

Someone

public text v1 · immutable
·published 2008-04-15 13:53 UTC
rendered paste body
start1:

clear

echo ""
echo ""
echo "             ---------------------------------------------"
echo "             Ý                                           Ý"
echo "             Ý              Client Lookup 1              Ý"
echo "             Ý                                           Ý"
echo "             Ý                                           Ý"
echo "             Ý            			       Ý"
echo "             ---------------------------------------------"
echo ""
echo ""
echo ""
echo "             Please select your transaction file... "
echo ""
echo "             S Student Personal Details"
echo "             C Course Details"
echo "             E Exam Details"
echo "             B Backup the data files"
echo "             Q Quit"
echo ""
echo -n "          Enter your selection and press <Enter>: " 

set choice = `head -1`

switch($choice)
	case [sS]:
		set serverfile = "StudentDetails.txt"
		
		breaksw
	
        case [cC]:
                set serverfile = "Course.txt"
                breaksw

	case [eE]:
		set serverfile = "Exam.txt"
		breaksw
	
	case [qQ]:

		exit
		breaksw

	case [bB]:

		clear
		echo ""
		echo ""
		echo " Backup in progress..."

		echo "Backing up data."
		sleep 1;
		clear
		echo "Backing up data.."
            sleep 1;
 		clear
		echo "Backing up data..."
            sleep 1;
		clear
		echo "Backing up data...."
            sleep 1;
		clear
		echo "Backing up data....."
            sleep 1;
		clear
		echo "Backing up data......"
            sleep 1;
		clear
		echo "Backing up data......."
            sleep 1;
		clear
		echo "Backing up data........"
            sleep 1;
		clear
		echo "Backing up data........."

		cat StudentDetails.txt > StudentMaster1.txt
		cat Course.txt > CourseMaster1.txt
		cat Exam.txt > ExamMaster1.txt

		echo ""
                echo "             Press <enter> to goto menu"
                set ra = `head -1`
		goto start1
		breaksw

	default:
		echo ""
		echo "Incorrect choice..."
		echo ""
		echo -n "Press 'Y' to try again, or 'Q' to quit... "
	        set flag = `head -1`
		
		if ($flag == 'Y' || $flag == 'y') then
			goto start1
		else
			exit
		endif
		breaksw
endsw