Scripting

I require help trying to find out why this code is not operating as intended. I have included the instructions of the assignment and the code I have worked on.

Lab 4 Points: 100
Submit: upload your script to lab4 dropbox. Name it [your last
name]_lab4.sh.
Goal: Create a script that will generate a properly formatted HTML file (see out.html) based on a CSV
(comma separated values) input file. The input file, input.csv is provided. The HTML file should present
the data in a table with a border. The file generated by your script should look exactly like out.html.
Usage: have your script print to standard out, then use output redirection to create the output file. For
example:
Lab4.sh input.csv should print to standard out (the screen).
Lab4.sh input.csv > output.html should create an HTML output file that looks exactly like the provided
sample.
Data (courtesy of http://www.briandunning.com/sample-data/, an excellent source of free testing
data):
 500 records total
 Data surrounded by quotes (“ “)
 Commas separate fields, but if a comma occurs inside the quotes, it should be ignored.
 Fields and brief descriptions:
o Names are random, drawn from random first and last names in the US Census.
o Addresses are real, but do not correspond to Names/Company names.
o Company names are real, but are from a totally different part of the country than the
address they are listed with.
o Phone and fax numbers are random and don’t correspond to any of the above.
o Email and Web addresses are fake, but properly formatted.
Hints/Advice
1) Read Chapter 3 and Section 5.2 of Chapter 5 before attempting this lab.
2) There are quite a few different ways to do this assignment. Pipes may be very helpful. You may
also want to use sed’s -e argument to issue multiple replacement commands (see Section 5.2).
3) Don’t forget to print all of the required HTML lines – these don’t need sed, but your HTML file
will not display properly in a browser without them (I will grade partly based on the appearance
of the HTML file).

Scripting I require help trying to find out why this code is not operating as intended I have included the instructions of the assignment and the code I have wo class=