Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 2.41 KB

README.md

File metadata and controls

45 lines (28 loc) · 2.41 KB

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.

The slides are here, and if you missed the lecture here will be 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, you will need to mv your directory since it has the same name as the one we will use today.

mv tfcb_2023 tfcb_2023_lecture04

Then use this command to grab the materials we'll work though today:

git clone https://github.com/fredhutch/tfcb_2023.git
cd tfcb_2022/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.