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 (:)
  • Input/Output redirection (>, <, >>)
  • Redirecting output
  • Redirecting input
  • Pipe (|)
  • Running a process in the background (&)

Variables and Parameters

  • Removing variables (unset)
  • Variables with null values
  • Storing results in a variable (backticks ``)
  • Positional parameters ($0, $#, $1, $2, $3, etc.)
  • Manual parameter shifting
  • Quoting
  • Escape character (\)

Regular Expressions

Conditional Statements

  • The if/then structure
  • The if/then/else structure
  • Nesting if statements
  • The if/elif structure
  • Case statement
  • Operators
  • Logical operators AND (&&) and OR (||)
  • test command

Script Termination

The exit statement

Utilizing the program's exit status in a script ($?)

Tests and Operators

  • File operators
  • File type tests
  • File attribute tests

Comparison Operators

  • Arithmetic comparison using if
  • Integer comparison operators
  • String comparison
  • Complex comparisons (AND, OR)
  • Nesting comparison operators
  • Assignment operator
  • Arithmetic operators
  • Bitwise operators
  • Logical operators
  • Numeric constants

Loops

  • for/in loop
  • The seq command
  • While loop
  • 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

Functions

sleep command

Troubleshooting (debugging)

Requirements

  • Familiarity with basic Linux commands and file system navigation.
  • Experience using the shell and performing simple text edits on Linux.
  • Completion of the "Introduction to Linux" course is recommended but not mandatory.

Target Audience

  • Linux users aiming to automate tasks via shell scripting.
  • System administrators focused on optimizing server management and operations.
  • Developers and IT professionals looking to strengthen their Linux programming capabilities.
 14 Hours

Upcoming Courses

Related Categories