Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Law & Ethics Expert

Q. CS 652 - Programming problem?

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command. This command will look at the contents of two directories and report on the di?erences between them. This includes those ?les that are only in one directory or the other, as well as ?les that have the same name, but have di?erent characteristics as de?ned below. The format of this command will be:

diff [-R] [-c value] directory1 directory2

The options are as follows:

  • -c value, determines what level of di?erence should be reported between two ?les. If not speci?ed, the default is to say that two ?les are the same if they have the same name and are not di?erent types (?le vs. directory). If the option is speci?ed with a value of 1, then two ?les are only considered the same if they also have the same size. If the option is speci?ed with a value of 2, then two ?les are only considered the same if they have the same size and the same exact contents.
  • -R, when present the contents of subdirectories with common names in each directory should also be analyzed in a recursive manner.

The report generated by the program should include three lists of ?les for every pair of directories (or subdirectories in the recursive case). The ?rst list contains those ?les only in directory1. The second list contains those ?les only in directory2. The third list contains those ?les that have the same name in each directory, but are considered di?erent based on the -c option value. These lists should be sorted alphabetically. If a bad option is given to the command an error message should be displayed (including a bad value to the -c option). If anything other than two directories are speci?ed on the command line, an error message should be displayed.

Business Law & Ethics, Finance

  • Category:- Business Law & Ethics
  • Reference No.:- M9575338

Have any Question?


Related Questions in Business Law & Ethics

Assignment -purpose - this significant task requires

Assignment - Purpose - This significant task requires forward planning and adequate time for research, reading and reflecting. The purpose of the assignment is to enable you to achieve outcomes in knowledge, skill and ap ...

Managing the legal environment assignment - research

MANAGING THE LEGAL ENVIRONMENT ASSIGNMENT - RESEARCH PROJECT Company: Nike (a) Summarise in about 250-500 words the characteristics/features of the organisation (you can choose a statutory/government body or select a bus ...

Assessment descriptionyou are required to watch the

Assessment Description You are required to watch the following YouTube clips from the GRI Secretariat: 1. The GRI Sustainability Reporting Standards: The Future of Reporting 2. Introducing the GRI Standards You must also ...

Compare and contrast tort law and criminal law explain the

Compare and contrast tort law and criminal law. Explain the purpose of the law of torts in contract to the purposes of criminal law. Why are they different? Support your answer using specific examples from the textbook.

Corporations law - assignment questions -objectives -

CORPORATIONS LAW - ASSIGNMENT QUESTIONS - Objectives - Answer the following questions with reference to the relevant statute law and general common law principles operating in Australia concerning the consequences of the ...

Australian commercial law assessment - part a 300 words -in

AUSTRALIAN COMMERCIAL LAW ASSESSMENT - PART A (300 words) - In using the resources of the early Modules, your tribe discussed and developed a constitution. In the new constitution assume that there are rules protecting a ...

Business law assignment question -mabo has been said to a

BUSINESS LAW ASSIGNMENT QUESTION - Mabo has been said to a cornerstone of the Australian legal system. Your response must discuss the following: 1. Discussion of the Mabo (No 2) case. 2. Explain the impacts of the case o ...

Property law for business assignment question -mrs betty

PROPERTY LAW FOR BUSINESS ASSIGNMENT QUESTION - Mrs Betty Joyce lives in an old, war-time vintage army shed in Baldivis. When she started to live in the shed, in the early 1960s, the whole area was a remote backwater. Si ...

Australian commercial and corporations law assignment -this

Australian Commercial and Corporations Law Assignment - This assignment deals with critical problem solving skills. This assessment tests course objectives addressing: Knowledge of relevant law, Application of the law to ...

Instructionplease choose one question from the following to

Instruction Please choose One question from the following to answer: 1. Dealsgate is a Victorian town in Southern-East England, famous for its beautiful beach. It used to attract many world-renowned writers and scholars ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As