Week 05 Tutorial Questions

Objectives

  1. The assignment specification doesn't fully explain the assignment - what can I do?

  2. How hard are the subsets?

  3. What does git init do?

    How does this differ from pushy-init?

  4. What do git add file and pushy-add file do?

  5. What is the index in pushy (and git), and where does it get stored?

  6. What is a commit in pushy (and git), and where does it get stored?

  7. Apart from the pushy-* scripts what else do you need to submit (and give an example)?

  8. You work on the assignment for a couple of hour tonight.
    What do you need to do when you are finished?

  9. 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.

  10. Given an anonymous list of CSE logins.

    Write a shell script last.sh that, using shell case statments, finds the number of loggins that occurred from within UNSW.
    (Look for connections to from the uniwide network)

    Additionally, find the distribution of zIDs by their first digit.

  11. 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
    =================
    
  12. 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

  13. Create a git repository called cs2041-Labs and add you week01 and week02 lab work.

    Then push your repository to the CSE gitlab servers.

    When logging in to the CSE gitlab, make sure you use the "UNSW" tab.
    Not the "Standard" tab.

  14. There is a git repository located on the CSE gitlab servers at https://nw-syd-gitlab.cseunsw.tech/cs2041/23t2-tut05
    Clone this repository to your local machine.