Question: You will write a bash script that simulates the collection of data from two home sensors: the gas sensor and the temperature sensor: A.

You will write a bash script that simulates the collection of data from two home sensors: the gas sensor and

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_Data.txt" 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 100. 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: 1. Your script needs to run automatically at regular intervals, on three days of the week (Monday, Tuesday and Wednesday) at 2 a.m. in the morning because you have long outdoors duty on these three days. [2 mark] 2. 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]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the instructions in the image you need to create and manage scripts Heres how to accomplish ... View full answer

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 Programming Questions!