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 has a full-fledged programming language with variables, conditional statements, loops and even functions.


The focus of this reading is some basic networking and an introduction to shell scripting in bash.


The readings for Monday, January 29 are:

  1. The Linux Command Line:

    • Chapter 16 - Networking
    • Chapter 17 - Searching For Files
    • Chapter 18 - Archiving And Backup

  2. Shell Scripting Tutorial

Optional Resources

The following are additional resources that you may find useful:

Shell Scripting


Terminal Multiplexer

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.

Just For Fun

Try out the following commands at your own discretion:

$ nc towel.blinkenlights.nl 23

$ telnet nyancat.dakko.us

# Note: To exit, do Ctrl-], then enter the quit command.


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!

$ ./exists.sh * ASDF || echo Success  # Run script and check error code
answers.json exists!
exists.sh exists!
README.md exists!
ASDF does not exist!


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.