Chapter 6. Automating Tasks with Scripts

This chapter shows how to automate various tasks using scripts.

The topics covered in this chapter are as follows:

  • How to create a script to automate a task.
  • The proper way to use cron to run the script automatically at specific times.
  • How to use ZIP and TAR to perform compressed backups.
  • Source code examples.

The reader will learn how to create automated scripts.

We talked about the sleep command in Chapter 3, Using Loops and the sleep Command. It can be used to create an automated script (that is, one that runs at a specific time with no user intervention) as long as a few guidelines are followed.

This very simple script will reinforce what we covered in Chapter 3 Using Loops and the sleep Command about using ...

Get Linux Shell Scripting Bootcamp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.