05 - Module 5 - Bash Scripting
05 - Module 5 - Bash Scripting
Bash Scripting
• Variables, Input
• Loops
• Functions
• Practical Examples
Intro to Bash Scripting
• ❯ testing=`date`
• Arguments "$0,$1,$2….."
If, Else, Elif Statements
• Syntax
if [ <some test> ]
then
< commands >
elif [ <some test> ]
then
< different commands >
else
< Other commands >
fi
Boolean Logical Operations
Loops
• Syntax:
function_name () {
commands
}
• OR:
function_name () {commands;}
• Call:
function_name
Practical Examples