0% found this document useful (0 votes)
19 views

Linux Lesson 11 - Useful Scripting Tools

The document discusses basic scripting tools in Linux including for loops, if statements, using $$ to refer to processes, and redirecting error messages to log files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Linux Lesson 11 - Useful Scripting Tools

The document discusses basic scripting tools in Linux including for loops, if statements, using $$ to refer to processes, and redirecting error messages to log files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

1

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.

You might also like