linux logo

Goals


- Master the programming of the Bash shell

Program

Shell concept
Different shells: sh, ksh, bash

Presentation
Option management
– classic options
– additional options

Workshop : manipulations of the Bash options

Roles of a script
Composition of a script
Script executions

Workshop : first script

The different types of variables
Creation, deletion of variable
Variable assignments
Set command
Handling character strings
– Length of a chain
– Case management
– Management of substrings
Arithmetic operations

Workshop : exercises on variables

Concept of argument
Argument handling variables

Workshop : basic management of script arguments

Principles of the test instruction
Test and digital
Test and strings
Test and files
Alternative writing

Workshop : mastering the test instruction

Conditional execution
– if structure
– Case structure
Iterative execution
– For loops
– while and until loops

Workshop : advanced management of script arguments

Basic principles
Declaration of a function
Using a function
Visibility of variables
Parameters of a function
Include a function file

Workshop : creation of a « library » of functions

Bash and regular expressions
Managing options for a script
Signal interceptions
Dry-run mode
A word about optimization…

Workshop : illustration of advanced concepts

Presentation
Main options
Structure of an order
– line selection
– substitution command
– add, insert and delete commands

Workshop : automated manipulation of a file with SED

Presentation
Structure of an AWK script
The variables
The tables
The instructions
Functions

Workshop : writing an AWK script for information on user groups

Duration

3 days

Price

£ 1627

Audience

Linux system administrators

Prerequisites

Knowledge of basic Linux commands

Reference

LIN100884-F

Sessions

Contact us for more informations about session date