Skip main navigation

What is Bash/Shell Scripting?

Before we look at scripting, let’s take a step back and break down what a shell is and how it relates to you and your computer. What is a Shell? …

Help area

Need help? In the comments section below, you can leave any questions you might have about the Week 3 material, and the educators and your fellow learners might be able …

Environment and Shell variables In Linux

In computer operating systems, an environment is an area that contains information about the behaviour of programs and applications. Linux environment variables are used by applications to get information about …

Bash Functions

When you’re writing Bash scripts, you’ll often find that there are repetitive tasks. Instead of copying and pasting the same code to multiple places in your scripts, try using a …

While Loop and Until Loop

Both for loops and while loops are very similar. Typically, we use for loops where we know exactly how many iterations we need – i.e. they have a definitive start …

File Manipulation: sort and uniq

What are sort and uniq? Ordering and manipulating data in Linux-based text files can be carried out using the sort and uniq utilities. The sort command orders a list of …

Accessing File Content

Here are some commands you can use to display the file contents This section is focussed on displaying the contents of a file within a terminal window, and in order …

For Loops

What is a loop? A loop is a construct which allows you to repeatedly execute the same commands. We will be discussing three types of loops: for loops, while loops …

The Linux File System: Directories and Files

In Linux, as with other operating systems, information is stored in files. As the week progresses, we will look in detail at files and investigate their content, how to create …

The Terminal and the Command Line

For the bioinformatician, the things which make Linux most powerful are the terminal and, within it, the command line. Most Linux distributions come with an array of graphical user interface …

What is Linux?

What is the Linux operating system? Linux is an operating system, like Microsoft Windows or Mac OSX (and lately Mac OS 11). An operating system (OS) is a computer program …

Switch Case Statements

Sometimes of conditional logic may be too complex for if statements. In these situations, the issue isn’t that it’s impossible to write the logic as nested if statements, but that …

If and If Else Statements

In the previous step, we looked at conditional expressions, the means by which we can perform comparisons between values of different types. Now, we’re going to make use of those …