Week 10 – Start Programming in Linux using bash scripting
I. Introduction to Shell Scripting
- This section could provide an introduction to shell scripting, including what it is and how it is used in Linux. It could also cover the basics of writing and executing shell scripts, such as using the sh or bash commands.
II. echo and read commands
- This section could cover the echo and read commands, which are used to output text to the terminal and read input from the user, respectively. It could also cover using variables and special characters in these commands.
III. Shell Variables
- This section could explain how to define and use variables in shell scripts, including how to assign values to variables and how to reference them.
IV. Positional Parameters
- This section could cover positional parameters, which are special variables that hold the values of command line arguments passed to a script. It could also explain how to access and manipulate these variables.
V. Command Substitution / Math Operations
- This section could cover command substitution, which allows you to execute a command and use its output as a value in a script. It could also cover basic math operations in shell scripts, such as using the expr command to perform arithmetic calculations.
VI. test statements
- This section could cover the test command, which is used to evaluate conditions and return a Boolean value (true or false). It could also cover using the test command in if statements to control the flow of a script.
VII. if / elif-else statements
- This section could cover using if statements to execute code based on the result of a test condition. It could also cover using elif statements to specify additional conditions, and using else statements to execute code when all other conditions are not met.
VIII. for loop statements
- This section could cover using for loop statements to execute a block of code multiple times. It could also cover loop variables and how to control the loop using break and continue statements.