Everyone:
Next week, we will explore some basic networking utilities and then begin learning about shell scripting. That is, we will go from interactively controlling the Unix shell to utilizing the shell as a full-fledged programming language with variables, conditional statements, loops and even functions.
The focus of this reading is some basic networking tools and an introduction to shell scripting in bash.
The readings for next week are:
Chapter 18 - Archiving And Backup
Read from 1. Introduction through 13. Functions and then about exit codes and trap.
The following are additional resources that you may find useful:
A tool that will be demonstrated in class, but not assessed in the reading quiz or homework is tmux, which is one of the most game-changing programs you could ever learn:
Although not required, it is highly recommended that you learn how to use tmux.
Try out the following commands at your own discretion:
$ nc towel.blinkenlights.nl 23
The instructor has been working with the Office of Digital Learning on a small educational game about networking for the Principles of Computing course:
Feel free to play around with it and let us know what you think in this survey.
Once you have completed the readings, answer the following Reading 02 Quiz questions:
To verify the correctness of your exists.sh
script, you should be able to
reproduce the following:
$ ls -l # List files in reading02 directory total 8.0K -rw-r--r-- 1 pbui pbui 23 Jan 18 15:39 README.md -rw-r--r-- 1 pbui pbui 144 Jan 28 13:37 answers.json -rwxr-xr-x 1 pbui pbui 254 Jan 28 18:02 exists.sh $ ./exists.sh * && echo Success # Run script and check error code answers.json exists! exists.sh exists! README.md exists! Success $ ./exists.sh * ASDF || echo Success # Run script and check error code answers.json exists! exists.sh exists! README.md exists! ASDF does not exist! Success
To submit you work, follow the same process outlined in Reading 01:
$ git checkout master # Make sure we are in master branch $ git pull --rebase # Make sure we are up-to-date with GitLab $ git checkout -b reading02 # Create reading02 branch and check it out $ cd reading02 # Go into reading02 folder $ $EDITOR answers.json # Edit your answers.json file $ ../.scripts/submit.py # Check reading02 quiz Submitting reading02 assignment ... Submitting reading02 quiz ... Q1 1.00 Q2 0.50 Q3 0.50 Q4 0.30 Q5 0.30 Q6 1.40 Score 4.00 $ git add answers.json # Add answers.json to staging area $ git commit -m "Reading 02: Done" # Commit work $ git push -u origin reading02 # Push branch to GitLab
Remember to create a merge request and assign the appropriate TA from the Reading 02 TA List.