Einstein labs
Einstein labs will involve writing Shell scripts for marks.
Setup for the Einstein lab exams
You will have "Exam mode" labs.
- Guest login. No student-owned files.
- No student.computing.dcu.ie.
- You may not get out phones or other devices. Phones cannot be on desks. They must stay in coats or bags.
- You may not bring any paper notes.
- No Internet, Google or AI.
- You are limited to:
- Linux command-line.
- man pages
- My notes. humphryscomputing.com
- Einstein upload page.
- You must do these physically in the labs.
This is enforced by the software.
- Each test will be revealed on the day, on the course home page.
- Tutors supervise.
- Silent labs. No talking.
- Upload to Einstein for marks.
- Time limited to the lab session.
Instructions for lab exams
- Debug them locally on Linux first.
- Do not debug them on Einstein.
- Naming:
- You must use the exact filenames I will give you.
- Scripts for Einstein must end in ".sh"
-
Shell scripts in general do not need any extension. I never use an extension myself.
The .sh here is an Einstein requirement.
- Editing:
- You can edit with gedit (run in parallel to command line):
gedit file.sh &
- Or you can edit with nano (have to exit to go back to command line, or else make two command lines):
nano file.sh
- Running:
- $HOME/bin is not set up on the lab exam logins.
- A quick fix is you can run your program (say it is called "file.sh") by typing:
./file.sh
- Note that in a normal environment we can get rid of "./" and ".sh".
- Uploading:
- When the script is debugged locally, upload it to Einstein for marks:
- Click on the upload section to select your file.
Or drag and drop your file.
- Note the "einstein" upload script:
einstein file.sh
will not work for the lab exams.
- Check how you did:
-
- You can have any number of attempts (within the lab time) to pass the tests.
Late students
- You must come on time.
- A few minutes late is not an issue, like 10 minutes,
but serious latecomers are causing issues with trying to use machines already used by other students who have finished and left.
- If you are very late, certainly 30 minutes or worse,
you will have to wait by the door for a tutor to seat you. Follow tutor's direction. If they tell you to wait, you wait.
- If you are very late, you may not be allowed sit at all.
Homework: How to write a shell script
Before the first lab:
-
Do the
Lab on shell
in full.
Homework: Practice run on Einstein
You can do a practice run to test the Einstein system.
- Edit a program called justhello.sh
- It outputs "Paris is a beautiful city" with new line.
- Run it locally to test it.
- Upload it to Einstein to test the Einstein system.
- Report for you
This is only relevant to some lab exams.