Question: This needs to be in BASH If an office or workshop space used regularly to be the principal place from which a business is run,

This needs to be in BASH
If an office or workshop space used regularly to be the principal place from which a business is run, it is
defined as a home office. Tax laws allow a person who runs a home office to claim home office expense
costs which will reduce how much income tax this person must pay.
You are given a set of data values of expenses for a home office from January to December in a year in a
data file named homeOfficeData.dat. The format of data will look like this.
178.67,140.67,120.00,780.00,1200.00,456.78,680.90,800.00
211.00,146.00,130.00,780.00,1200.00,691.00,680.90,0.00
................
(Open the above data file and take a peek at the data)
Each row of values above are Electricity, Heating, Telephone, Mortgage Int, Rent, City Taxes, Home
Insurance, Repairs & Maintenance - in that order.
Write a bash script to open and read the file homeOfficeData.dat line by line and then prints each
month's expenses as shown in the example below. The last two columns are calculated.
Depreciation =7.5% of (sum of all expense columns per row)
Total per Month = sum of all columns per row (including the calculated depreciation)
A title with date and your name, calculated data must be shown for full credit.
After the Total Paid line is printed, following will be calculated and printed.
Grand Total: 52856.54
Percentage : 8%,**" This is the percentage of your home, exclusively used as the business office or space
Total Claim: 4228.52*This is the total amount you can claim for the year for Home Office Expenses
Grand Total is the same total printed as the final total of the Total/Month column.
Percentage is a fixed 8%
Total Claim is calculated 8% of the Grand Total.
Shown below is an actual run.
Title, Report Run date and
Your Name MUST be shown
clearly.
This column must be
calculated 7.5% of the total
of 8 previous columns
This value is the same
Total Per Month Grand
Total
This is 8% of the Grand
Total
NOTE: FOR FULL CREDIT, YOUR OUTPUT MUST MATCH THE ABOVE OUTPUT
EXACTLY AS IS, INCLUDING NUMBER FORMATTING (Precision 2),
DESCRIPTION TEXT, % and $ SIGNS, COLUMN ALIGNMENT AND LINES
DRAWN.
**The output should match the attached shell output screenshot. All columns, rows, and totals should be lined up exactly as the illustration shows.
This needs to be in BASH
 This needs to be in BASH If an office or workshop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!