Explore BrainMass
Share

unix shell script to check date and give message

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

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.

© BrainMass Inc. brainmass.com October 16, 2018, 11:12 pm ad1c9bdddf
https://brainmass.com/computer-science/trees/unix-shell-script-to-check-date-and-give-message-249994

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 : ...

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

$2.19
Similar Posting

Competitor comparisons

See attached file.

I need help answering a couple of questions dealing with Apple Inc and Microsoft. I have Apple's FY 2009 data but don't have Microsoft's.

1. How does Apple Inc income statement common-size data and the profitability ratios differ from Microsoft's? Based on annual report data, why might these differences exist?

2. What balance sheet and liquidity ratios differ from competitor? Based on annual report data, why might these differences exist?

3. Do the operational ratios compare favorable to the competitor?

(added)
4. In your opinion, how does the company compare to the competitor? What are the primary differences? What factors explain the reasons for these differences?

View Full Posting Details