This is the first of two projects in this class. The purpose of these projects is for you to explore a topic we have covered in lab in more detail. This will require you to do some research on your own; however, if you get stuck, please ask your instructor for help. You should choose one of the following projects, complete it, and put your results in the git repository for this project. Please make a note of which project you have chosen in the file.

If you would like to do another project that is not on this list, please ask your instructor by Friday, March 24.

For each project, you must submit an file containing answers to questions, as well as any configuration files, program source, or scripts you wrote for the assignment. Your submission for this project should be similar to the lab assignments you have submitted so far.

The project is due at 11:59:59 PM on Thursday April 6, 2017.

Get started early, so you have more time for other stuff.

Project Options

Project A: Shell Scripting

For this project, you will discover some fancy shell scripting features.

  1. What is command substitution? Write at least two example shell scripts that use it. (Hint: bc can be useful for doing non-integer math.)
    • Be sure to comment your shell scripts!
  2. Read this article on job control in Bash.
    1. What happens to paused or background jobs when you log out?
    2. What does the command disown do?
    3. What does the command wait do?
    4. Briefly summarize (in your own words) when job control might be useful for you.

Project B: Version Control

For this project, you will get to experiment with some more complicated git features.

  1. Visit and work through the following levels:
    • Introduction Sequence (Parts 1 through 4)
    • Ramping Up (Parts 1 through 4)
  2. What does git rebase do?
  3. What does HEAD refer to?
  4. Write relative refs for the commit that is…
    1. Just before master.
    2. Three commits before HEAD.

Project C: Regular Expressions

Write a program (in C++ or another language of your choice) that accepts HTML over STDIN and does the following:

  1. Prints the text of every hyperlink (<a> tag) and the URL that it links to.
  2. Prints the alt-text of every image (<img> tag) and the URL of the image.

A couple of other requirements:

  • If you decide to write a program that requires compiling (C++, Go, etc.), be sure to include a Makefile, so that we can build your program!
  • Update the to explain how to use your program.


  • wget -O or curl can download webpages for you.
  • You need to use regular expressions!
  • If you want to write a C++ program, here are some things to think about:
    • C++ 11 has a regular expression library, but it may not be available in the version of g++ on the campus machines
    • The Boost library has a regular expression library. You just have to tell g++ that you want to use it: g++ *.cpp -lboost_regex
  • Consider writing a shell script and using some of the tools you’ve already learned about.

Project D: [Your title here]

Come up with your own project!

Talk to your instructor before the deadline mentioned above about this one. If you go rogue and make your own without seeing if it’s OK, we’re not going to grade it.

If you do this one, be sure to include a description of your project in your to remind us what your project is about.


Push to your project repository as you would with any ol’ lab assignment. As always make sure that everything looks correct on the GitLab website. Don’t commit junk files; don’t leave out important files.

We will grade whatever is on your master branch as of 11:59:59 PM on Thursday April 6, 2017.


You will be graded on the following:

  • Indicating project choice in
  • The responses in your
    • Make them complete and coherent
    • Format them as Markdown if you please
  • Any relevant config/source/script files you commit to your repository
  • Having a clean, well organized repository
    • Name files sensibly
    • Don’t commit junk files!
    • Write a .gitignore if it makes sense for your project.
  • Sane, coherent commit messages.