Reference no: EM132832196
Question 1
Given a list of filenames, write a script called older.sh that returns the oldest file.
That is, typing older list will return the name of the oldest file in the list.
When you are testing your script, it may be useful to use the commands touch -t 202103081800 foo, touch -t 202103081801 goo, and touch -t 202103081802 hoo to create three dummy files, foo, goo and hoo to work with.
Include written documentation about your shell script. Put the code of your shell script on Github so it can be checked.
Question 2
Write a script called funny.sh that prints out the phrase ‘This is funny' if you include an argument when you invoke the script, i.e., typing ./funny.sh will result in the above phrase being printed out.
However, if you invoke the script with no argument, then the script should then return the phrase ‘This is NOT funny'.
Include written document about your shell script. Put the code of your shell script on Github so it can be checked.
Question 3
(a). Use curl to download case-cp.sh from the Wünschiers book into your directory. How did you do this?
(b). Write a shell script that
• no chime if the time lies between 0 minute and 20 minutes past the hour
• one chime if the time lies between 20 minutes and 40 minutes past the hour
• two chimes if the time lies between 40 minutes and 60 minutes past the hour, between the two chimes, sleep 1 second.
Attachment:- Assignment Task.rar