Get in Touch

Course Outline

The simplest script

Choosing the shell (magic number #!, Shebang)

Calling the script

External and built-in commands

Some special characters

  • Comment (#)
  • End of Line (;)
  • An empty statement (:)
  • Redirection of input output (>, <, >>)
  • Redirecting output
  • Redirection of input
  • Stream (|)
  • Start the process in the background (&)

Variables and Parameters

  • Variable destruction (unset)
  • Variable with a null value
  • Save the result to a variable (backquotes ``)
  • Parameter requests ($ 0, $ #, $ 1, $ 2, $ 3 ...)
  • Manual shift
  • Quoting.
  • Escape character (\)

Regular Expressions

Conditional statements

  • The if / then
  • The if / then / else
  • Nesting if statements
  • The if / elif
  • case statement
  • Operators
  • Logical operators and, or (&&, | |)
  • test command

Completing the script

The exit statement

Use the status of program completion in a script ($?)

Tests and Operators

  • Text file operators
  • Tests for file type
  • Test file attributes

Comparison operators

  • Comparing arithmetic using the if command
  • Integer comparison operators
  • Comparing strings
  • 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
  • Until loop
  • Controlling the loop (break, continue)

Text Processing

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

Text search (grep)

Stream Editor (sed)

Interactive programs

  • read command
  • select command

Functions

sleep command

If the script does not work? (debugging)

Requirements

  • A fundamental understanding of basic Linux commands and file system navigation.
  • Experience using shells and performing simple text editing on Linux.
  • Completion of the "Introduction to Linux" course is recommended but not mandatory.

Audience

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

Number of participants


Price per participant

Upcoming Courses

Related Categories