Linux Free Course Module 4 Chapter 6: Conditional Structures: If then...
PythonBaba - 0
Bash Conditional Structures: CASE Construct
IF - THEN construct in Bash
IF - THEN
In Bash, we have the following conditional statements:
1. if..then..fi statement (Simple If)
2. if..then..else..fi...
Linux Free Course Module 4 Chapter 5: Logical Operators
PythonBaba - 0
OPERATORS: Bash Logical Operators
Logical Operators
Operator Symbol
Meaning
&&
Logical AND
||
Logical OR
!
Logical NOT
Examples
echo $((2 && 0))
0
echo $((4 && 1))
1
echo $((3 || 0))
1
echo...
Linux Free Course Module 4 Chapter 4: Bitwise Operators
PythonBaba - 0
OPERATORS: Bash Bitwise Operators
Bitwise Operators
Bitwise Operators
Operator Symbol
Meaning
<<
Bitwise Left Shift
>>
Bitwise Right Shift
&
Bitwise AND
|
Bitwise OR
~
Bitwise Negate
^
Bitwise XOR
Examples
a=4
let b="$a<<1"
echo $b
8
b=8
c=4
echo $(($c|$d))...
Linux Free Course Module 4 Chapter 3: Arithmetic Operators
PythonBaba - 0
OPERATORS: Bash Arithmetic Operators
Arithmetic Operators
Arithmetic Operators
Operator Symbol
Meaning
+
Addition
-
Subtraction
*
Multiplication
/
Division
%
Mod Operator
**
Exponent Operator
Arithmetic evaluation using let command
Arithmetic evaluation using let command
The let statement can be used to do...
Linux Free Course Module 4 Chapter 2: SHELL SCRIPTING
PythonBaba - 0
SHELL SCRIPTING
What is a Script?
What is a Script?
The script is a text file which will contain:
Shell commands you normally use.
Shell flow control...
Linux Free Course Module 4 Chapter 1: SHELL BUILDING BLOCKS
PythonBaba - 0
SHELL BUILDING BLOCKS
Components of Shell Building Blocks
Shell Building Blocks
• Shell syntax
• Shell commands
• Shell functions
• Shell parameters
• Shell expansions
• Redirections
• Executing commands
• Shell scripts
What...
Linux Free Course Module 3 Chapter 7: More File attributes
PythonBaba - 0
More File attributes
File Systems and Inodes
File Systems
Every file system in Unix/Linux has a directory structure headed by root ( / )
If you have...
Linux Free Course Module 3 Chapter 6: Process
PythonBaba - 0
Process in Linux
Process Basics
A process is simply an instance of a running program. A process is said to be born when the program starts...
Linux Free Course Module 3 Chapter 5: Vi Editor Commands
PythonBaba - 0
Vi Text Editor
Vi Text Editor Modes
The vi text editor has three modes namely
1. Writing mode:
2. command mode:
3. command line mode:
When vi editor is opened,...
Linux Free Course Module 3 Chapter 4: Filters
PythonBaba - 0
Filters
What are Filters in Linux
What are filters: Basics
Filters: Using both standard input and standard output
Do all commands use the feature of standard input and...