Get in Touch

Course Outline

The simplest script

Choosing the shell (magic number #!, Sha-bang)

Calling the script

External and built-in commands

Special characters

  • Comment (#)
  • End of Line (;)
  • Empty statement (:)
  • Redirection of input and output (>, <, >>)
  • Redirecting output
  • Redirection of input
  • Pipe (|)
  • Running the process in the background (&)

Variables and Parameters

  • Destructuring variables (unset)
  • Variables with null values
  • Saving results to a variable (backticks ``)
  • Parameter requests ($0, $#, $1, $2, $3...)
  • Manual shift
  • Quoting
  • Escape character (\)

Regular Expressions

Conditional statements

  • The if/then construct
  • The if/then/else construct
  • Nesting if statements
  • The if/elif construct
  • Case statement
  • Operators
  • Logical operators (and, or: &&, ||)
  • Test command

Completing the script

The exit statement

Using the program's completion status in a script ($?)

Tests and Operators

  • File text operators
  • Testing file types
  • Testing file attributes

Comparison operators

  • Arithmetic comparison using the if command
  • Integer comparison operators
  • String comparisons
  • Complex comparisons (and, or)
  • Nesting comparison operators
  • The assignment operator
  • Arithmetic operators
  • Bitwise operators
  • Logical operators
  • Numeric constants

Loops

  • The for/in loop
  • The seq command
  • The while loop
  • The until loop
  • Loop control (break, continue)

Text Processing

  • Commands: head, tail
  • Sort, Uniq, Expand, Unexpand
  • Cut, Paste, Join, Wc, Tr

Text search (grep)

Stream Editor (sed)

Interactive programs

  • Read command
  • User select

Features

Sleep command

Troubleshooting: What to do if the script does not work? (Debugging)

Requirements

  • A foundational understanding of basic Linux commands and file system navigation.
  • Experience with shell usage and simple text editing on Linux.
  • While not mandatory, completion of the "Introduction to Linux" course is recommended.

Audience

  • Linux users aiming to automate tasks through shell scripting.
  • System administrators seeking to optimize server management and operations.
  • Developers and IT professionals looking to improve their Linux programming skills.
 14 Hours

Custom Corporate Training

Training solutions designed exclusively for businesses.

  • Customized Content: We adapt the syllabus and practical exercises to the real goals and needs of your project.
  • Flexible Schedule: Dates and times adapted to your team's agenda.
  • Format: Online (live), In-company (at your offices), or Hybrid.
Investment

Price per private group, online live training, starting from 3200 € + VAT*

Contact us for an exact quote and to hear our latest promotions

Provisional Upcoming Courses (Contact Us For More Information)

Related Categories