In the final project for the Operating Systems course at Damascus University, fourth year, we were given some tasks that we have to solve using Bash. They cover different aspects of shell scripting such as manipulating text files, registering cronjobs, and parsing arguments.
The project consists of 5 questions:
- Interaction with text files:
We have to interact with a simple text file database (key-value pair) using operations that will be described below:
- Adding a record
- Updating a record
- Removing a record
- Searching for a record in the database using its key
Values are saved in the DB in base64
format.
- Backing up / Restoring / Enabling automatic backups for the database in question 1
- Monitoring a system's performance
- Setting up a simple FTP server for downloading/uploading
- A wrapper around
find
with a caching layer
- (4th question):
lftp
(sudo apt installlftp
),zip
(sudo apt installzip
) - (5th question):
cacheme
script (found in the root of the project) to be included in your $PATH
Please try to follow this guideline to ensure consistency across the codebase:
snake_case
for function namesUPPERCASE
for variables- Append functions with the
function
keyword - Utility functions in
utils.bash
should all be prefixed with__
to avoid namespace collisions