Bash Tutorial – Learn Bash Shell Scripting

About Bash

Bash is a Unix Shell. Using Bash commands we can write applications for Linux OS.

ADVERTISEMENT

Bash Script

Bash Script is a file with commands that can be run from Linux Terminal.

Bash Tutorial

With the help of these Bash Shell Scripting tutorials, we shall learn bash scripting. Little understanding of the Linux file system and terminal commands would be helpful to get started with these tutorials.

Bash Tutorial

Bash Scripting Basics

In these series of basic bash tutorials, we shall introduce you to some of the bash fundamentals.

Bash Operators

In the following tutorials we cover different kinds of operators, in detail with examples .

  • Bash Operators
  • Bash – Arithmetic Operators Examples and usage demonstration of arithmetic operators in bash scripting.
  • Bash Relational Operators
  • Bash Conditional Operators+

Bash Conditional Statements

Conditional Statements help to branch out the program execution based on the value of an expression. Following are some of the bash tutorials that provide a broad understanding of conditional statements that can be used in bash scripting.

  • Bash If Introduction to conditional statements with if statement. Contains syntax and examples.
  • Bash If-Else Going a step deeper into two-level branching of program control.
  • Bash Else-If Multiple branching conditions in a single statement.
  • Bash Case statement Executing a specific set of statements based on the value of a variable or an expression.

Additional

  • Bash If AND Use AND logical operator in If statement’s condition to join two or more simple conditions.
  • Bash If OR Use OR logical operator in If statement’s condition to join two or more simple conditions.
  • Bash If NOT Use NOT logical operator to invert the condition in If statement.

Bash Loops

  • Bash For loop For Loop statement helps to execute a set of statements for each member of a data set or a derived data type variable.
  • Bash While loop Repeat a set of statements based on an expression.
  • Bash Until loop This is a little variation to while loop, but it is handy.

Bash Strings

Bash Functions

Functions help to wrap a logical piece of a task as a functionality that could be called.

  • Bash Functions A basic introduction to functions in Bash Scripting.
  • Bash Override commands This is interesting. You can override the built-in commands with your own set of statements.

Bash Arrays

Arrays are used to store multiple elements in a single container. Elements can be accessed using the index.

  • Bash Array Introduction to initialize an array and access elements of it in bash scripting.

Bash File Operations