Question
Unix Visual Studio Code Lab4 Points: 100 Goal: Create a script that will generate a properly formatted HTML file (see out.html) based on a CSV
Unix Visual Studio Code
Lab4 Points: 100
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: Feel free to use any testing source of Free Sample Data that come in a CSV format, but it must include the following below.
-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 dont 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 seds -e argument to issue multiple replacement commands (see Section 5.2). 3) Dont forget to print all of the required HTML lines these dont need sed, but your HTML file will not display properly in a browser without them.
Extra Challenge (5 extra credit points on Lab 4) Make your script highlight every TN row in the output table in red. The entire row should be highlighted (not just the cell containing TN).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started