Use scripting to automate system maintenance tasks
A bash shell script:
- begins with a shebang (
#!/bin/bash) which tells the operating system which interpreter to use to parse the rest of the file - contains a series of commands or/and typical constructs of imperative programming
- is usually associated with the
.shextension - must be executable:
chmod +x <file>.sh - can be executed by typing:
./<file>.sh
To learn more about bash, have a look at the bash refresher in this repo.