- Leren door doen
- Trainers met praktijkervaring
- Klassikale trainingen
- Gedetailleerd cursusmateriaal
- Duidelijke inhoudsbeschrijving
- Maatwerk inhoud mogelijk
- Trainingen die doorgaan
- Kleine groepen
In de cursus Linux Shell Scripting van SpiralTrain leren de deelnemers shell scripts te schrijven in een Linux omgeving. De deelnemers leren scripts te schrijven met script commands, special characters, reguliere expressies en I/O redirection. Centraal in de cursus staat de Bash shell.
De cursus Linux Shell Scripting gaat van start met een uitleg over de basisprincipes van shell scripts. Shell scripts zijn typisch kleine programma's die uitgevoerd worden door een command line interpreter. Systeembeheerders maken vaak gebruik van shell scripts voor operaties zoals file manipulatie, programma-executie en het printen van tekst. Deze cursus biedt een solide basis in het schrijven en gebruiken van shell scripts, wat onmisbaar is voor iedere IT-professional.
Aan de orde komt hoe shell scripts kunnen worden uitgevoerd met de exec en fork-commando's. Voorts wordt de syntax van shell scripts besproken. Ook de verschillen tussen de diverse shells zoals de Bourne, C, Korn en Bash shell passeren de revue.
Speciale aandacht is er voor de Bash shell. Hierbij wordt ingegaan op de diverse profielen, het zetten van locale en globale variabelen en het exporteren van variabelen. Daarnaast komen command substitution en shell expansion aan de orde.
Dan worden reguliere expressies, die bij uitstek geschikt zijn voor pattern matching, besproken. De syntax van reguliere expressies en de betekenis van de diverse speciale karakters wordt toegelicht. Deze kennis is essentieel voor het effectief manipuleren van tekst in scripts.
Voorts wordt aandacht besteed aan de sed batch-editor en de awk report-generator. Met de sed batch-editor kan de creatie en aanpassing van een tekstbestand automatisch worden afgehandeld. Dit maakt het een krachtig hulpmiddel voor systeembeheerders en ontwikkelaars.
Vervolgens wordt in de cursus Linux Shell Scripting ingegaan op control flow met conditionals en loops en het lezen en schrijven van files. Ook leren de deelnemers hoe ze de input van gebruikers in scripts kunnen verwerken met command line parameters, options en redirection.
Tenslotte staat het aanroepen en schrijven van functies, het doorgeven van parameters en het opvangen van return values op het programma. Dit stelt deelnemers in staat om complexe scripts te schrijven die gebruik maken van herbruikbare code.
Voor meer informatie over shell scripting, bekijk de officiële Bash documentatie. Voor gerelateerde cursussen, zoals Scripting met Powershell, kunt u ook onze andere trainingen bekijken.
De cursus Linux Shell Scripting is bedoeld voor administrators, developers en testers die shell scripts in een Linux omgeving willen leren schrijven en begrijpen.
Om aan deze cursus te kunnen deelnemen is algemene kennis van computers en operating systems vereist. Ervaring met programmeren is bevorderlijk voor een goede begripsvorming.
De theorie wordt behandeld aan de hand van presentaties. De concepten worden toegelicht met demo's. De theorie wordt afgewisseld met oefeningen. De cursustijden zijn van 9.30 tot 16.30.
De deelnemers krijgen na het goed doorlopen van de cursus een officieel certificaat Linux Shell Scripting.
Module 1 : Shell Scripting Intro |
Module 2 : Executing Commands |
Module 3 : Bash Environment |
| What are shell scripts? Types of shells Bourne Shell C Shell Korn Shell Bash shell Invocations Bash Startup Files Interactive Shells Conditionals and Arrays Shell Arithmetic Directory Stack |
Fork and Exec Built-in Commands Creating Script Files Shell Syntax Shell Functions Shell Parameters Shell Expansions Redirections Init Script Writing Scripts Executing Scripts Debugging Scripts |
Shell Initialization Files /etc/profile and /etc/bashrc User Configuration Files /.bash_profile, /.bash_login and /.bash_logout Global Variables and Local Variables Exporting Variables Reserved Variables Special Parameters Shell Expansion Command Substitution Aliases Bash Options |
Module 4 : Regular Expressions |
Module 5 : sed and awk |
Module 6 : Conditionals |
|
What is Grep? Grep and Regular Expressions Pattern Matching Meta Characters Repetition Operators Line Anchors Word Anchors Single Character Match Wildcards Character Ranges Range Expressions Character Classes |
What is sed? sed Commands Interactive Editing Deleting Lines Range of Lines Non-Interactive Editing Using sed in Scripts What is awk? Print Selected Fields Formatting Fields Special Patterns awk Scripts and Variables |
Selection Statements if-then-else Statement Checking Files Checking shell Options Testing exit Status String Comparisons Nesting if's Boolean Operations The test Command Compound Condition Testing case Command Initscript with case |
Module 7 : Interactive Scripts |
Module 8 : Repetitive Tasks |
Module 9 : Functions |
|
Displaying Messages echo Built-in Escape Sequences read Built-in Prompt for User Input File Descriptors Redirection of Errors File I/O Closing File Descriptors Here Documents |
Iteration Statements for Statement while Statement until Statement Loop control Output Redirection Input Redirection Break and Continue select Built-in shift Built-in |
Function Syntax Function Parameters Positional Parameters return Built-in Variables in Functions Array Variables and Functions Functions on Command Line Catching Signals Signals with kill Handling traps |