teaching machines

CS 330 Lecture 4 – Shell Scripting, Part 3

January 30, 2017 by . Filed under cs330, lectures, spring 2017.

Dear students,

Okay, let’s really get around to writing these shell scripts this time:

  1. Send files to limbo/recycling bin, rather than hell/non-existence.
  2. Send a mass email.
  3. Upload a local file to a web server and let the world see it.

Let’s consider the shell as a programming language by discussing the following questions:

What’s the purpose of the shell? What’s something you might want to do with a shell script that isn’t as easy in another language?
Does the shell support operators and expressions? What can you do with its data?
Does the shell have a mechanism for abstracting code?
Does the shell have a mechanism for passing data around?
How are errors handled?

If we have time, we’ll have a peek at some Ruby scripts to do the following:

Here’s your TODO list for next time:

Sincerely,