Print the file path and the number of lines in the file

Assignment Help Basic Computer Science
Reference no: EM13948706

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.

Reference no: EM13948706

Questions Cloud

Develop a similar class hierarchy for pets. : Java programmers can use class hierarchies for the purposes of inheritance. For example, given a Tree class, we could define Conifer and Deciduous sub classes that inherit from the parent Tree class as you can see here:
What is the maximum number of bits in the sum of the n k-bit : Describe a combinational circuit that computes the sum of n k-bit numbers more efficiently. Analyze the size and depth of this circuit.
What is the japanese name for the popular art : What is the Japanese name for the popular art, usually woodcuts, that literally means "pictures of the floating world"? What are the stamped characters called that have been added to many Chinese letters and paintings
Classify the resources in each of the given situations : Classify the resources in each of the above situations as flexible or committed. If the resource is committed, determine whether it is committed for the short term or committed for multiple periods.
Print the file path and the number of lines in the file : Run my script on a weekday, redirecting your output to the file my_save and append a copy of my script.
Which three countries have most equal income distribution : The two points for the international income distributions reported in Table 8-1 can be used to make a rough calculation of the Gini coefficient. Use a spreadsheet to estimate the Gini coefficient for each country. Which three countries have the mo..
What will its profit in london be in this case : Assume that Toyota transports the cars to London by itself at a cost of $120 per car. What price should Toyota set in London in order to maximize its profit? What will its profit in London be in this case?
What are the alternatives facing chesbrough inc : What are the alternatives facing Chesbrough, Inc., with respect to production of component K-25? List the relevant costs for each alternative. Suppose that Chesbrough, Inc., purchases K-25 from Berham Electronics.
How did the new american nation deal with slaves : Declaration of Independence- How did the new American nation deal with Slaves and Slavery

Reviews

Write a Review

Basic Computer Science Questions & Answers

  The data rate of the transmission line is doubled

Bernie's speed is doubled; (ii) each tape capacity is doubled; (iii) the data rate of the transmission line is doubled.

  Find the value for portb

Find the value for PORTB after the execution of the following code:PORTB = ~0xAA; PORTB = 0x0A

  Design an application to take and process a pizza order

Design an application to take and process a pizza order. The user should be able to make pizza order choices from listboxes, and the application should display the order price.

  Ackermann''s function

Ackermann's Funcation is a recursive mathematics algorithm that can be used to test how well a computer performs recursion. Design a function ackermann (m, n), which solves Ackermann's Function in python. Use the following logic in your function:

  Lead a software development team to build a system

You have been asked to lead a software development team to build a system fulfilling the Statement of Need specified in project 1. Your team is employed by a small company. The customer wants a project that balances reasonable development cost, ti..

  Devise an algorithm for multiplying two large numbers

Suppose you have available a pocket calculator that can multiply a four-figure number by a four-figure number and get the correct eight-figure answer

  Given a 3 millisecond seek time

Given a 3 millisecond seek time for a disk drive and assuming that once you reach the starting track you will write the file as contiguous sectors, how long will it take to write a 1 megabyte file? The disk rotates at 7200 rpm and each sector hold 1 ..

  Business environment and businesses are constantly

In this highly competitive business environment, businesses are constantly seeking ways to gain traction and understand what is on the minds of current customers and potential customers in order to increase business efficiency.

  Why is it difficult to compare the usability of computer

List three important factors to consider when deciding to use paper or a computer to display information.

  Determine last element of a list using prolog

Using Prolog as programming language for LOGIC, create relevant command to do following tasks:-Determine the last element of a list. Find K'th element of list. (K=5)

  Design a program using java code to process round trip

Design a program using JAVA code to process round trip tickets for travel to 2 cities and determine the bill for the travel tickets. The return trip must be at least 7 days from the initial trip to qualify for a discount of 20%, otherwise trave..

  What do you mean by data independence

What do you mean by data independence? Explain your answer, paying attention to how data independence is implemented.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd