Linux Lesson 11 - Useful Scripting Tools
Linux Lesson 11 - Useful Scripting Tools
Trainer/trainee Notes
Being able to read and write scripts is a critical part of being proficient on a Linux host. In this module we will
look at some basic tools to help with this.
2
Trainer/Trainee Notes
This slide walks through some basic for loops. This becomes more useful when you are using it in a script than
on a command line.
3
Trainer/trainee Notes
As you can see here there is a basic format for writing if statements. This is a very useful tool to use – the
formatting is extremely important in shell scripts for this to work properly.
4
Trainer/Trainee Notes
Here we are looking at a couple of examples where we are using $$ to refer to the current process.
5
6
Trainer/Trainee Notes
This syntax is useful especially if you want to ensure your error messages are recorded into a log file instead of
just printing out to a screen.