UNIX Shell Scripting Bourne loop Question programming homework help
Description:
Write a shell script (to run on the Bourne shell) that runs an infinite loop to monitor the creation and removal of .pdf or .PDF files under the current directory. Every 3 seconds it should display a list of those filenames created or removed after the previous display. Without loss of practical significance of this utility, we can assume that the time interval between creation of a .PDF or .pdf file and removal of a .PDF or .pdf file is over 3 seconds, which means that it’s unnecessary for your script to handle the situation where creation of a file is followed by immediate removal of a file. (Hint: research the cmp and comm commands.) Your script for this task must be named tasktwo.sh.
The following is a sample output of the script (It is OK that the script leaves behind a temporary file when it is finally interrupted):
No pdf files have been created or removed in the last 3 seconds.
No pdf files have been created or removed in the last 3 seconds.
The following pdf file(s) have been created in the last 3 seconds:
a3.pdf a4.pdf a5.pdf
The following pdf file(s) have been removed in the last 3 seconds:
a4.pdf a5.pdf
No pdf files have been created or removed in the last 3 seconds.
No pdf files have been created or removed in the last 3 seconds.
… … … … …
Need your ASSIGNMENT done? Use our paper writing service to score good grades and meet your deadlines.
Order a Similar Paper Order a Different Paper