Hesburgh Libraries

Software Carpentry: Intro to the Unix Shell Sessions 3 & 4

Feb 5, 2020

4:00 pm – 6:00 pm

247 Hesburgh Library, Navari Family Center for Digital Scholarship

Session 3 & 4 Workshop Overview

This workshop further introduces participants to the Unix shell.

Participants will come to appreciate the shell as a power tool that allows people to do complex things with just a few keystrokes. More importantly, it helps them combine existing programs in new ways and automate repetitive tasks.

In the first hour of the workshop we’ll combine commands to do new things using pipes and filters, then we’ll introduce how to use loops to perform the same actions on many different files. In the second hour of the workshop we’ll learn how to save and re-use commands. We are going to take the commands we repeat frequently and save them in files called shell scripts so that we can re-run those operations later by typing a single command. We’ll wrap up by using “find” and “grep” to develop our skills for using the shell to find files and find things inside files.

Objectives

  1. Redirect a command’s output to a file
  2. Process a file instead of keyboard input using redirection
  3. Construct command pipelines
  4. Write a shell script that runs a command or series of commands for a fixed set of files
  5. Run a shell script from the command line
  6. Write a shell script that operates on a set of files defined by the user on the command line
  7. Create pipelines that include shell scripts you, and others, have written

If you did not take Intro to Unix Shell Session 1, please review Introduction to the Unix Shell episodes 1-3.

Please bring your laptop. To complete this lesson, you will need a UNIX-like shell environment (see Setup). You will also need to download and extract the file "shell-lesson.zip" from GitHub. Once you have unzipped and extracted the file, you should end up with a folder called “shell-lesson”.

If you need help setting up your shell environment or downloading the lesson files, please contact the CDS at cds@nd.edu.

View All Events

Sign up to receive weekly email updates for specific types of events.

284 Hesburgh Library, Notre Dame, IN 46556

Circulation Desk Phone (574) 631-6679

Security Monitors Phone (574) 631-6350

asklib@nd.edu

Facebook  Instagram  LinkedIn  Twitter   NDlibraries
Hesburgh Library Logo
Phone Number: (574) 631-6679