Skip to content

Latest commit

 

History

History

lecture05

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Lecture 05: Next steps in the shell

Melody Campbell (@melodygcampbell, campbelllab.org)

This lesson builds on the work that we did in the previous session, while adding additional complexity.

Learning objectives

After these two lectures, you should be able to:

  • Navigate a file system in the shell (lecture 04)
  • Run commands in the shell (lecture 04)
  • Understand basic usage of redirection (lecture 04)
  • Write a for loop (lecture 05)
  • Edit a file using vim (lecture 05)
  • Write a basic shell script (lecture 05)

In the second lecture, We will go over the commands presented in the previous session. We will use some of these commands to write a for loop that can automate tasks. We will also learn how to edit a file using vim and how to write and submit a shell script. A signficant portion of this session will be dedicated to working though the tutorial, initially made by Erick Matsen. He is much funnier than I am, so all credit to him!

The slides are here, and if you missed the lecture here is a recorded version.

Tutorial

This is an interactive tutorial to teach you about navigating the shell.

To get started, access the unix shell on your computer.

Once you have logged on, execute the following commands:

(Optional) If you followed along yesterday for the interactive lecture and named your folder tfcb_2023, you will need to mv your directory since it has the same name as the one we will use today.

mv tfcb_2024 tfcb_2024_inclass

I think you've already cloned the repo via this command, but if not then use this command to grab the materials we'll work though today:

git clone https://github.com/fredhutch/tfcb_2024.git

I've made some changes since class started! Please update your repo:

cd tfcb_2024
git pull

VERY IMPORTANT! If you have issues here let me know!!

Otherwise

cd tfcb_2024/lectures/lecture04

Now you can start the first lesson by clicking here. We recommend keeping a browser open with the lesson materials as you work through the exercises on VS Studio or your computer. Go to this page to see the complete list of files for this lecture. The quickref.md file is a short-as-possible quick reference sheet with basic commands.