Skip to content

sib-swiss/shell-scripting-training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UNIX Shell Scripting

Welcome to the home page of the UNIX Shell Scripting SIB course. This repository contains all of the course material.


Course resources 📚

Course slides:

Exercise instructions:

Documentation:



Course description 💫

Overview

Scripting allows shell users to automate repetitive tasks, improving reproducibility, reducing the risk of errors, freeing time, and avoiding boredom.

Bioinformatics analysis pipelines may involve dozens or hundreds of steps that are each carried out by different command-line programs: assembling these into scripts allows users to treat whole pipelines as if they were ordinary shell commands.


Audience

This course targets users who already have basic knowledge of interactive shell use, such as taught in the SIB's Introduction to Linux / UNIX and the Bash shell , and are interested in moving from interactive to automated tasks.


Learning objectives

The course covers the following topics:

  • Understanding command parsing and processing by the shell:
    • Tokenizing.
    • Command parsing.
    • Expansions (brace, parameter, process substitution).
    • Word splitting and the IFS.
    • Globbing.
    • Standard input/output re-directions.
  • The main syntactic constructs of the Bash shell: tests, conditionals, loops and functions.
  • String and arithmetic operations.
  • Reading inputs and writing outputs.
  • Passing and parsing command-line arguments and options to shell scripts.
  • Using arrays.
  • Assembling individual analysis steps into reproducible, automated pipelines.


Prerequisites and environment setup 🔨

Knowledge / Skills

Participants are expected be familiar with the basics of UNIX shells, in particular:

  • Moving around the file system and creating/deleting directories: ls, cd, mkdir, rmdir.
  • Understanding path names, i.e. what is the path to a file or a directory.
  • Redirecting output to files or other programs: >, >> and | operators.
  • Some familiarity with basic shell utilities such as grep, cut, tr (no expert skills required).
  • Proficiency with a text editor (necessary to write/edit script files).

Notions of programming (in any language) will be useful, but are not essential. For a more detailed list of prerequisites, please see this document.


Technical - setting-up your environment

🔥 Important: please make sure perform the following environment setup before the start of the course.

The only technical requirement for the course is having a version of bash >= 4.0 (released in 2009) installed on your computer.

If you need to install bash, please see the setting-up your environment instructions documentation.

About

UNIX shell scripting - course material

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •