e-learning

Advanced CLI in Galaxy

Abstract

This tutorial will walk you through the basics of how to use the Unix command line.

About This Material

This is a Hands-on Tutorial from the GTN which is usable either for individual self-study, or as a teaching material in a classroom.

Questions this will address

  • How can I combine existing commands to do new things?
  • How can I perform the same actions on many different files?
  • How can I find files?
  • How can I find things in files?

Learning Objectives

  • Redirect a command's output to a file.
  • Process a file instead of keyboard input using redirection.
  • Construct command pipelines with two or more stages.
  • Explain what usually happens if a program or pipeline isn't given any input to process.
  • Explain Unix's 'small pieces, loosely joined' philosophy.
  • Write a loop that applies one or more commands separately to each file in a set of files.
  • Trace the values taken on by a loop variable during execution of the loop.
  • Explain the difference between a variable's name and its value.
  • Explain why spaces and some punctuation characters shouldn't be used in file names.
  • Demonstrate how to see what commands have recently been executed.
  • Re-run recently executed commands without retyping them.
  • Use grep to select lines from text files that match simple patterns.
  • Use find to find files and directories whose names match simple patterns.
  • Use the output of one command as the command-line argument(s) to another command.
  • Explain what is meant by 'text' and 'binary' files, and why many common tools don't handle the latter well.

Licence: Creative Commons Attribution 4.0 International

Keywords: Foundations of Data Science, bash, jupyter-notebook

Target audience: Students

Resource type: e-learning

Version: 11

Status: Active

Prerequisites:

CLI basics

Learning objectives:

  • Redirect a command's output to a file.
  • Process a file instead of keyboard input using redirection.
  • Construct command pipelines with two or more stages.
  • Explain what usually happens if a program or pipeline isn't given any input to process.
  • Explain Unix's 'small pieces, loosely joined' philosophy.
  • Write a loop that applies one or more commands separately to each file in a set of files.
  • Trace the values taken on by a loop variable during execution of the loop.
  • Explain the difference between a variable's name and its value.
  • Explain why spaces and some punctuation characters shouldn't be used in file names.
  • Demonstrate how to see what commands have recently been executed.
  • Re-run recently executed commands without retyping them.
  • Use grep to select lines from text files that match simple patterns.
  • Use find to find files and directories whose names match simple patterns.
  • Use the output of one command as the command-line argument(s) to another command.
  • Explain what is meant by 'text' and 'binary' files, and why many common tools don't handle the latter well.

Date modified: 2024-10-15

Date published: 2021-09-30

Authors: Avans Hogeschool, Bazante Sanders, Helena Rasche, The Carpentries

Scientific topics: Software engineering


Activity log