How it works...

Now we will see a description of the logger command and the create_alarm script we just wrote:

  1. The logger command made an entry about your file in the syslog file, which was in the /var/log directory of your system. You can check that file. Navigate to the /var/log directory and run nano syslog and you will find the entry in that file.
  2. We created a script to create an alarm. We used the date command for the date and time. We also used the sleep command to block the alarm for that particular time.

Get Bash Cookbook 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.