Detail kurzu

BASH1 - Shell Scripting

EDU Trainings s.r.o.

Popis kurzu

Toto školení je zaměřené na získání základních znalostí pro skriptování v shellu (konkrétně v Bourne-shell kompatibilních shellech). Kurz se zaměřuje jak na jednotlivé pokročilé vlastnosti shellu (konkrétně bash/POSIX shell), tak i na související externí nástroje (filtry) pro základní manipulaci s textem. Součástí kurzu je dále práce s programovatelnými filtry pro textové transformace a základní techniky použití regulárních výrazů. Školení se skládá z přednášek (50 %) a praktických cvičení (50 %).

Obsah kurzu

Školení je rozděleno do několika modulů, které obsahují teoretické přednášky, ukázky z praxe a praktické příklady (laby), ve kterých si mohou účastníci kurzu vyzkoušet řešit typické problémy při skriptování na reálných datech. Je také možné diskutovat vlastní problémy a jejich řešení.

UNIX Shell Introduction

  • Purpose of shell
  • History of shell (sh, csh, ksh, bash, …)
  • Command line interpretation
  • Process hierarchy

Writing and Debugging Scripts

  • What is script
  • How to write script
  • Script file permissions
  • Script execution
  • Basic debugging of script

Shell Environment

  • Shell variables
  • Environment variables
  • ‚eval‘ built-in command
  • Aliasing and ‚alias‘ built-in command
  • Shell configuration and customization

Regular Expressions

  • ‚grep‘ command
  • ‚grep‘ command options
  • Basic regular expressions
  • Extended regular expressions

Data Manipulations Using sed Filter

  • ‚sed‘ command
  • Patterns and actions in ‚sed‘
  • Text substitutions
  • Back-references in substitutions

Data Manipulation Using awk Filter

  • ‚awk‘ commands
  • Types of patterns in ‚awk‘
  • Actions and block of commands in ‚awk‘
  • Associative arrays
  • Built-in and user functions

Conditions and Branching

  • Script parameters
  • Exit codes
  • ‚test‘ command
  • Branching using ‚if‘ and ‚case‘ compound commands
  • Extended test commands
  • Loops using ‚for‘ and ‚while‘/‚until‘ compound commands

Interactive Scripts and User Input

  • Input processing using ‚read‘ built-in command
  • User input processing using ‚select‘ compound command
  • Input/output redirections

Script Options and Arguments Proccessing

  • Options processing using ‚getopts‘ built-in command
  • Arguments processing using ‚for‘ or ‚while‘ loops

Shell Variables

  • Variable declaration and usage
  • Arrays
  • Variable value manipulations

Shell Fuctions

  • Blocks of commands (in current/sub shell) – anonymous functions
  • Named function declaration and usage
  • Differences between functions and scripts
  • Functions libraries

Signals and Traps

  • List and sending signals
  • Signals and reactions
  • ‚trap‘ built-in command
  • Ignoring signals

Cílová skupina

Tento kurz je vhodný pro všechny uživatele UNIX/Linux, kteří si chtějí psaním skriptů šetřit práci s opakujícími se úkoly. Typicky se jedná o systémové a síťové správce, technické uživatele, operátory, vývojáře software a testery. Obecně uživatele, kteří řeší problémy spojené s automatizací úloh nebo transformací dat jako např. textů, logů nebo konfigurací.

Kontaktní osoba

Lukáš Vallo
+420 724 792 023
lukas.vallo@edutrainings.cz

Hodnocení




Organizátor