Purchase Solution

unix shell script to check date and give message

Not what you're looking for?

Ask Custom Question

Create a script that checks the day of the week, and takes one of two actions (step 2 or 3) depending on the day.
If the day is Monday through Friday, print (send to stdout) the name of the day. Then, find each file named TTDL (Things-To-Do List) in the tree rooted at the current directory (pwd on down). Using a separate output line for each of these files, print the file path and the number of lines in the file using wc -l. Create at least two TTDL files to test my program: one in my working directory and one in a subdirectory.
If the day is Saturday or Sunday, print only a simple message, such as "Go back to sleep".
Run my script on a weekday, redirecting your output to the file my_save and append a copy of my script.

Purchase this Solution

Solution Summary

Attached are the following:
1. 249994.sh : This is the script file containing the commands and explanations.
2. my_save : This is the output file
3. TTDL : This is the input file I created

Solution Preview

Attached are the following:
1. 249994.sh : This is the script file containing the commands and explanations.
2. my_save : This is the output file
3. TTDL : ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.