Question: Task 2 : The objective of this task is to enhance the students' ability in using Bash / Unix commands and deploying them in real

Task 2: The objective of this task is to enhance the students' ability in using Bash/Unix
commands and deploying them in real-life scenarios. [9 marks]
You will write a bash script that simulates the collection of data from two home sensors: the gas
sensor and the temperature sensor:
A. Create a directory named "Sensor_Dtata" in the home directory. [1 mark]
B. Inside the "Sensor_Dtata" directory, create two files for collecting the sensors" data
separately. Name your files as: "Gas_Sensor_Datatat" and
"Temperature_Sensor_Data.txt".[1 mark]
C. Using the command line, write, in the two sensors' files, 20 values, that fall between 0 and
Save the changes in the files. [1 mark]
D. Write a script that reads the values stored in the sensor's files. Your script needs to be an
executable file. [1 mark]
E. Set-up your script to be called in two cases:
Your script needs to run automatically at regular intervals, on three days of the week
(Monday, Tuesday and Wednesday) at 2a.m. in the morning because you have long
outdoors duty on these three days. [2 mark]
Your script needs to run after one hour. For this purpose, use crontab command.
[2 mark]
F. On the command line, run proper commands to find the two sensor files among other txt
files in the home directory. [1 mark]
 Task 2: The objective of this task is to enhance the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!