Day 5 : Advanced Shell Scripting
Day5 : Advanced Shell Scripting #90DaysofDevops
- Write a bash script createDirectories.sh. When the script is executed with three given arguments (directory name, start number and end number) it creates a specified number of directories with a dynamic directory name.
Input:
Execution:
- How to schedule a script or any job to run automatically in Linux?
We can do scheduling in crontab.
The cron command-line utility is a job scheduler on Unix-like operating systems. Users who set up and maintain software environments use cron to schedule jobs. It's also known as cron jobs which can run periodically at fixed times, dates, or intervals.
Each crontab file entry contains six fields separated by spaces or tabs in the following form:
Minute Hour day_of_month month weekday Command
Example:
Ensure cron service is running using "service cron status"(Ubuntu)
Output:
If this post was helpful, please follow and click the ๐ button below to show your support.
_ Thank you for reading!
_Sudipa
ย