reddit hackernews mail facebook facebook linkedin

Introduction to Bash scripting

This 3-day hands-on course introduces participants to Bash scripting for task automation and system administration. From writing simple scripts to managing processes, securing code, you’ll learn practical skills to boost productivity and control over your Linux environment. Perfect for devs and sysadmins.


Initiation Bash
Télécharger le programme (pdf)

Public cible:

  • System administrators
  • Dev(Sec)Ops engineers
  • Anyone interested in automation

Objectifs pédagogiques:

  • Understand the fundamentals of the Bash shell and scripting syntax
  • Write and execute basic to intermediate Bash scripts
  • Automate common system tasks using loops, conditions, and variables
  • Manage processes and schedule tasks
  • Handle user input, signals, and logging in scripts

Pré-requis:

  • Being comfortable with CLI mode
  • Familiarity with basic Linux commands

Programme:

Day 1 - Introduction to Bash and file manipulation

Introduction to Bash
  • What is Bash?
  • Why learn Bash?
  • Basic commands
Writing and Running Bash scripts
  • What is a Bash script?
  • Create and execute a script
  • The Shebang
  • Grant permissions
  • Run a script
Variables
  • Understanding variables
  • Declaring and using variables
  • Types of variables
Conditional statements
  • What are conditional statements?
  • if-else statements
  • case statements
Loops (for, while, until)
  • for loops
  • while loops
  • until loops
Functions in Bash
  • Why use functions?
  • Defining and calling functions

Day 2 - Control structures, functions, and advanced scripting

User input and arguments
  • Reading user input
  • Script arguments
Redirection and pipelines
  • Output and error redirection
  • Using pipelines
File and directory operations
  • Creating and manipulating files/directories
Permissions and access rights
  • Understanding Linux file permissions
  • View and change permissions
Debugging and error handling
  • Debugging
  • Handling errors
  • Handle script interruptions
Process management in Bash
  • Understanding processes in Linux
  • Viewing processes

Day 3 - Process management, automation, and security

Handling signals and traps
  • What are signals?
  • How to handle signals
Scheduling tasks
  • Automating tasks
  • cron job format
Logging and monitoring scripts
  • Logging
  • Checking system logs
Securing Bash scripts
  • File permissions and execution restrictions
  • Validating user input
Resources
  • Books
  • Interactive platforms
  • Courses & videos
  • Tools




Gwendal Le Coguic - contact@glc.st - devis sur demande - SIRET 79778302400038