View on GitHub

Introduction to the Unix Shell

fredhutch.io's four-class intro to the Unix shell and command line

Introduction to the Unix Shell

Class 2: Repeating commands

Objectives

Finding things

Objectives: grep to select lines in text which match patterns, find to find files whose names match patterns, nesting files, text vs binary files

Loops

Objectives: write loops that apply commands to series of files, trace values in loops, explain variables vs values, why spaces and punctuation shouldn’t be used in file names, history, executing commands again

Shell scripts

Objectives: write shell script to run command or series of commands for fixed set of files, run shell script from command line, write shell script to operate on set of files defined on command line, create pipelines including user-written shell scripts

Making scripts executable:

Wrapping up

make sure work is saved

review how to get back into work

review objectives

preview next class’s objectives