Week 05 Tutorial Questions
Objectives
-
The assignment specification doesn't fully explain the assignment - what can I do?
-
What does turnip-add do?
-
What does turnip-submit do?
-
Apart from the turnip-* scripts what else do you need to submit (and give an example)?
-
You work on the assignment for a couple of hours tonight.
What do you need to do when you are finished? -
Write a shell script extract.sh that, when given one or more archive files as command line arguments, will use the correct program to extract the files.
-
Given an anonymous list of CSE logins.
Write a shell script last.sh that, using shell
casestatements, finds the number of logins that occurred from within UNSW.
(Look for connections from the uniwide network)Additionally, find the distribution of zIDs by their first digit.
-
Write a shell function top-and-bottom that, given a file name, prints the file name, plus the first and last lines of the file.
. top-and-bottom.sh top-and-bottom /usr/share/dict/british-english-insane ================= /usr/share/dict/british-english-insane ----------------- A événements =================
-
Write a shell function print_message that, given an optional exit status and a message:
If no exit status is given the program should print a warning
If an exit status is given the program should print an error and exit the program -
Create a git repository called cs2041-Labs and add your week01 and week02 lab work.
Then push your repository to the CSE gitlab servers.
When logging into the CSE gitlab, make sure you "Login with UNSW Single Sign On".
Not with the standard "Username" and "Password" fields. -
There is a git repository located on the CSE gitlab servers at https://gitlab.cse.unsw.edu.au/cs2041/26t1-tut05
Clone this repository to your local machine.