Get in Touch

Course Outline

The simplest script

Selecting the shell (magic number #!, Shebang)

Invoking the script

External and built-in commands

Key special characters

  • Comments (#)
  • End of line (;)
  • Null statement (:)
  • Input and output redirection (>, <, >>)
  • Redirecting output
  • Redirecting input
  • Pipes (stream) (|)
  • Running processes in the background (&)

Variables and Parameters

  • Unsetting variables (unset)
  • Variables with null values
  • Storing results in variables (backticks ``)
  • Parameter references ($ 0, $ #, $ 1, $ 2, $ 3 ...)
  • Shift parameter
  • Quoting.
  • Escape characters (\)

Regular Expressions

Conditional Statements

  • The if / then structure
  • The if / then / else structure
  • Nested if statements
  • The if / elif structure
  • Case statements
  • Operators
  • Logical operators: AND, OR (&&, ||)
  • The test command

Concluding a Script

The exit statement

Utilizing the script's execution status ($?)

Tests and Operators

  • File test operators
  • File type tests
  • File attribute tests

Comparison Operators

  • Arithmetic comparisons using the if command
  • Integer comparison operators
  • String comparison
  • Complex comparisons (AND, OR)
  • Nested comparison operators
  • Assignment operators
  • 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

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

Text search (grep)

Stream Editor (sed)

Interactive programs

  • read command
  • select menu

Features

sleep command

Troubleshooting: What to do if the script fails? (Debugging)

Requirements

  • A solid grasp 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 aiming to automate tasks via shell scripting.
  • System administrators seeking to optimize server management and operations.
  • Developers and IT professionals looking to enhance their Linux programming capabilities.
 14 Hours

Upcoming Courses

Related Categories