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 : The objective of this task is to enhance the students' ability in using BashUnix
commands and deploying them in reallife scenarios. 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 "SensorDtata" in the home directory. mark
B Inside the "SensorDtata" directory, create two files for collecting the sensors data
separately. Name your files as: "GasSensorDatatat" and
"TemperatureSensorData.txt mark
C Using the command line, write, in the two sensors files, values, that fall between and
Save the changes in the files. mark
D Write a script that reads the values stored in the sensors files. Your script needs to be an
executable file. mark
E Setup 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 in the morning because you have long
outdoors duty on these three days. mark
Your script needs to run after one hour. For this purpose, use crontab command.
mark
F On the command line, run proper commands to find the two sensor files among other txt
files in the home directory. mark
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
