User Tools

Site Tools


skill-tree:use:1:2:b

**This is an old revision of the document!**

USE1.2-B Shell Scripts

Background

The shell provides a programming language that allows you to write programs (known as shell scripts), which helps to combine commands into more complex applications.

Despite initially seeming cumbersome and inefficient to many, the real power of shell scripting quickly becomes apparent to those who use it. Everyday use is to automate repetitive tasks, which would otherwise be time-consuming to complete.

This skill covers the bash shell.

Aim

  • To automatize and bundle repetitive tasks in form of shell scripts.

Outcomes

  • Create a basic shell script that executes a sequence of programs
  • Design a script using the bash construct “if” that handle conditional execution based on
    1. performing a test for the existing of a file/directory
    2. testing for the presence of certain text in a file
  • Design a script that performs a task repeatedly using the bash “for” or “while” loop
  • Utilize debugging options for the troubleshooting of shell programs
    1. Options to bash: -e, -x
  • Use shell functions to break large, complex sequences, into a series of small functions

Subskills

skill-tree/use/1/2/b.1591545279.txt.gz · Last modified: 2020/06/07 17:54 by luciana