Bash or Bourne-Again SHell is a command interpreter and a scripting language widely used as a default across Linux-based operating systems. It provides a text interface to its users to execute commands. Beyond it’s access to the command-line interface, it has usual programming constructs such as loops, conditional statements, and functions.
The core competencies include theoretical fundamentals of Bash, common commands, variables and operators, conditional and loop statements, I/O operations, and ability to basic Bash scripts.
- Core Concepts - This includes, but is not limited to, an understanding of interpreted language vs compiled language, Bash files, shebang, and functioning of a shell.
- Basic Commands - Creation and Manipulation of files and folders [mkdir, cd, mv], searching for files [locate, glob, find], searching for strings in given text or files [grep], listing files in a directory [ls], and viewing information in a file [cat, head, less].
- Variables and Operators - A variable is used to store information in Bash and can contain a number, a character, a string of characters. Environment variables vs shell variables. Scope of variables [local and global]. Types of operators in Bash: Arithmetic Operators, Relational Operators, Boolean Operators, Bitwise Operators, and File Test Operators.
- Conditional and Loop statements - If-Else and case statements along with boolean expressions. Loop statements [for, while and until], and control statements [break, continue].
- I/O operations - Reading input from the command line, displaying using “echo” command, and redirecting output from stdout to a different destination.
- Ability to write Bash scripts - Writing simple Bash scripts that can perform simple operations. Example: a Bash script to add and output two numbers, etc.