How can i make this script

November 2, 2010 at 17:56:14
Specs: Windows Vista
hi ,

i need your help to creat script because i'm beginner

and i would like to learn about linux but i'v some

difficulties faced me i'nm using windows and Cygwin App with Gedit editor to insert commands
could you please help me to creat this script below


You have been asked to build a prototype phase test script, called*phase*, for a Professor X - the user. The script will be set up in a directory called *phasetest* in the user's home directory. Students should then be given access so they can run it. The program should be as general purpose as possible and as robust as possible. It should display a set of multiple choice questions, read the answer and check whether the answer is right. The overall score for every student should be recorded as well. The interface will be text based and so fairly rudimentary and should have these Questions


. How would you create a new directory called docs?

a) makedocs
b) mkdir docs
c) create docs
d) none of these

2. How would you delete a file called textFile?

a) delete textFile
b) remove textFile
c) rm textFile
d) none of these

3. How would you create an empty file called tempFile?

a) cat tempFile
b) empty tempFile
c) create tempFile
d) touch tempFile

4. What is the command to read the content of a file?

a) cat fileName
b) more fileName
c) less filename
d) all of above

5. What is the command to display a list of all files, including the hidden files?

a) ls –a
b) ls –all
c) display –hidden
d) ls –l

*Enter question number, N for next question, P for previous question or Q for done*
10. The command chmod is used to change permissions on a file. What .... etc

At the end it should tell the participant how many questions they got right. You should check that the person doing the test is who they say they are (as far as you can) and that they haven't done the test before. e.g. something like
Enter your ID
You only have one attempt and you have already done the test
If possible you should incorporate a time limit on the test. As well as the phase script you should also provide a script which will display all the results in either alphabetic order, or numeric order. If your scripts need any setting up then you should provide a setup script.

You should make the scripts as robust as possible since they will be used by a non specialist. They should be designed to operate from a directory called *phasetest *(under the user's home directory. Note - your scripts should be called *phase, display *and* setup


cerat 4 files Setup, Phase, Display and User

- admin run Setup file then Setup file creat directory called PhaseTest and copy (Phase and Display) files into PhaseTest

- the student run ./phase it should ask him about username and password which are stored in User file .and compare the input with variables in User file if they match then let him do his test within 10 minutes the timer should apper to the student if student press N then go to next question press P go to previous question press Q save his score in Display file and he can see thim in Display if the time finished also save his score in Display. if th student want to do exam again Phase test should check his username & password if he did it before
type to him "you did your exam check ./Display to see your result.

See More: How can i make this script

November 3, 2010 at 21:12:23
Which part did you need help with?

Report •
Related Solutions

Ask Question